Part Number Hot Search : 
FHX35LG 100E1 PCA9536 BV55C 1N4749 CES120J M30621 0000T
Product Description
Full Text Search
 

To Download ADUC845 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  microconverter ? multichannel 24-/16-bit adcs with embedded 62 kb flash and single-cycle mcu ADUC845/aduc847/aduc848 rev. a information furnished by analog devices is believed to be accurate and reliable. however, no responsibility is assumed by analog devices for its use, nor for any infringements of patents or other rights of third parties that may result from its use. specifications subject to chan ge without notice. no license is granted by implication or otherwise under any patent or patent ri ghts of analog devices. trademarks and registered trademarks are the prop erty of their respective owners. one technology way, p.o. box 9106, norwood, ma 02062-9106, u.s.a. tel: 781.329.4700 www.analog.com fax: 781.326.8703 ? 2004 analog devices, inc. all rights reserved. features high resolution -? adcs two independent 24-bit adcs on the ADUC845 single 24-bit adc on the aduc847 and single 16-bit adc on the aduc848 up to 10 adc input channels on all parts 24-bit no missing codes 22-bit rms (19.5 bit p-p) effective resolution offset drift 10 nv/c, gain drift 0.5 ppm/c chop enabled memory 62-kbyte on-chip flash/ee program memory 4-kbyte on-chip flash/ee data memory flash/ee, 100 year retention, 100 kcycle endurance 3 levels of flash/ee program memory security in-circuit serial download (no external hardware) high speed user download (5 seconds) 2304 bytes on-chip data ram 8051-based core 8051-compatible instruction set high performance single-cycle core 32 khz external crystal on-chip programmable pll (12.58 mhz max) 3 16-bit timer/counter 24 programmable i/o lines, plus 8 analog or digital input lines 11 interrupt sources, two priority levels dual data pointer, extended 11-bit stack pointer on-chip peripherals internal power-on reset circuit 12-bit voltage output dac dual 16-bit -? dacs on-chip temperature sensor (ADUC845 only) dual excitation current sources (200 a) time interval counter (wake-up/rtc timer) uart, spi?, and i 2 c? serial i/o high speed dedicated baud rate generator (incl 115,200) watchdog timer (wdt) power supply monitor (psm) power normal: 4.8 ma max @ 3.6 v (core clk = 1.57 mhz) power-down: 20 a max with wake-up timer running specified for 3 v and 5 v operation package and temperature range: 52-lead mqfp (14 mm 14 mm), ?40c to +125c 56-lead csp (8 mm 8 mm), ?40c to +85c applications multichannel sensor monitoring industrial/environmental instrumentation weigh scales, pressure sensors, temperature monitoring portable instrumentation, battery-powered systems data logging, precision system monitoring functional block diagram 62 kbytes flash/ee program memory 4 kbytes flash/ee data memory 2304 bytes user ram 3 16 bit timers baud rate timer 4 parallel ports single-cycle 8061 based mcu ADUC845 temp sensor current source ain0 ain9 aincom reset dv dd dgnd wake-up/ rtc timer iexc1 iexc2 pwm0 pga buf mux auxiliary 24-bit - ? adc primary 24-bit - ? adc dac buf pwm1 12-bit dac av dd dual 16-bit - ? dac dual 16-bit pwm power supply mon watchdog timer uart, spi, and i 2 c serial i/o mux 04741-0-001 xtal2 xtal1 osc avco agnd pll and prg clock div por refin+ refin? refin2? refin2+ external v ref detect internal band gap v ref figure 1. ADUC845 functional block diagram
ADUC845/aduc847/aduc848 rev. a | page 2 of 108 table of contents specifications..................................................................................... 4 abosolute maximum ratings ....................................................... 10 esd caution................................................................................ 10 pin configuration and function descriptions........................... 11 general description ....................................................................... 15 8052 instruction set ................................................................... 18 timer operation......................................................................... 18 ale............................................................................................... 18 external memory access ........................................................... 18 complete sfr map .................................................................... 19 functional description .................................................................. 20 8051 instruction set ................................................................... 20 memory organization ............................................................... 22 special function registers (sfrs)............................................ 24 adc circuit information.......................................................... 26 auxiliary adc (ADUC845 only) ............................................ 32 reference inputs ......................................................................... 32 burnout current sources .......................................................... 32 reference detect circuit ........................................................... 33 sinc filter register (sf) ............................................................. 33 - ? modulator ............................................................................ 33 digital filter ................................................................................ 33 adc chopping........................................................................... 34 calibration................................................................................... 34 programmable gain amplifier ................................................. 35 bipolar/unipolar configuration .............................................. 35 data output coding .................................................................. 36 excitation currents .................................................................... 36 adc power-on .......................................................................... 36 typical performance characteristics ........................................... 37 functional description .................................................................. 39 adc sfr interface..................................................................... 39 adcstat (adc status register) ........................................... 40 adcmode (adc mode register)......................................... 41 adc0con1 (primary adc control register)..................... 43 adc0con2 (primary adc channel select register) ........ 44 sf (adc sinc filter control register) .................................... 46 icon (excitation current sources control register) .......... 47 nonvolatile flash/ee memory overview ............................... 48 flash/ee program memory ...................................................... 49 user download mode (uload)............................................. 50 using flash/ee data memory.................................................. 51 flash/ee memory timing ........................................................ 52 dac circuit information.......................................................... 53 pulse-width modulator (pwm).............................................. 55 on-chip pll (pllcon).......................................................... 60 i 2 c serial interface ..................................................................... 61 spi serial interface ..................................................................... 64 using the spi interface .............................................................. 66 dual data pointers ..................................................................... 67 power supply monitor ............................................................... 68 watchdog timer......................................................................... 69 time interval counter (tic).................................................... 70 8052 compatible on-chip peripherals................................... 73 timers/counters ........................................................................ 75 uart serial interface................................................................ 80 interrupt system ......................................................................... 85 interrupt priority........................................................................ 86 interrupt vectors ........................................................................ 86 hardware design considerations ................................................ 87 external memory interface....................................................... 87 power supplies............................................................................ 87
ADUC845/aduc847/aduc848 rev. a | page 3 of 108 power-on reset operation........................................................88 power consumption ...................................................................88 power-saving modes ..................................................................88 grounding and board layout recommendations .................89 other hardware considerations...............................................90 quickstart development system ..................................................94 quickstart-plus development system ..................................94 timing specifications .....................................................................95 outline dimensions......................................................................104 ordering guide .........................................................................105 revision history 6/04changed from rev. 0 to rev. a changes to figure 5.........................................................................17 changes to figure 6.........................................................................18 changes to figure 7.........................................................................19 changes to table 5 ..........................................................................24 changes to table 24 ........................................................................41 changes to table 25 ........................................................................43 changes to table 26 ........................................................................44 changes to table 27 ........................................................................45 changes to user download mode section..................................50 added figure 51 and renumbered subsequent figures............50 edits to the dach/dacl data registers section .....................53 changes to table 34 ........................................................................56 added spidat: spi data register section..................................65 changes to table 42 ........................................................................67 changes to table 43 ........................................................................68 changes to table 44 ........................................................................69 changes to table 45 ........................................................................71 changes to table 50 ........................................................................75 changes to timer/counter 0 and 1 data registers section......76 changes to table 54 ........................................................................80 added the sbufuart serial port data register section.....80 addition to the timer 3 generated baud rates section............83 added table 57 and renumbered subsequent tables................84 changes to table 61 ........................................................................86 4/04revision 0: initial version
ADUC845/aduc847/aduc848 rev. a | page 4 of 108 specifications 1 av dd = 2.7 v to 3.6 v or 4.75 v to 5.25 v, dv dd = 2.7 v to 3.6 v or 4.75 v to 5.25 v, refin(+) = 2.5 v, refin(C) = agnd; agnd = dgnd = 0 v; xtal1/xtal2 = 32.768 khz crystal; all specifications t min to t max , unless otherwise noted. input buffer on for primary adc, unless otherwise noted. core speed = 1.57 mhz (default cd = 3), unless otherwise noted. table 1. parameter min typ max unit conditions primary adc conversion rate 5.4 105 hz chop on (adcmode.3 = 0) 16.06 1365 hz chop off (adcmode.3 = 1) no missing codes 2 24 bits 26.7 hz update rate with chop enabled 24 bits 80.3 hz update rate with chop disabled resolution (ADUC845/aduc847) see table 11 and table 15 resolution (aduc848) see table 13 and table 17 output noise (ADUC845/aduc847) see table 10 and table 14 v (rms) output noise varies with selected update rates, gain range, and chop status. output noise (aduc848) see table 12 and table 16 v (rms) output noise varies with selected update rates, gain range and chop status. integral nonlinearity 15 ppm of fsr 1 lsb 16 offset error 3 3 v chop on chop off, offset error is in the order of the noise for the programmed gain and update rate following a calibration. offset error drift vs. temperature 2 10 nv/c chop on (adcmode.3 = 0) 200 nv/c chop off (adcmode.3 = 1) full-scale error 4 ADUC845/aduc847 10 v 20 mv to 2.56 v aduc848 10 v 20 mv to 640 mv 0.5 lsb 16 1.28 v to 2.56 v gain error drift vs. temperature 4 0.5 ppm/c power supply rejection 80 db ain = 1 v, 2.56 v, chop enabled 113 db ain = 7.8 mv, 20 mv, chop enabled 80 db ain = 1 v, 2.56 v, chop disabled 2 primary adc analog inputs differential input voltage ranges 5, 6 gain = 1 to 128 bipolar mode (adc0con1.5 = 0) 1.024 v ref /gain v v ref = refin(+) ? refin(?) or refin2(+) ? refin2(?) (or int 1.25 v ref ) unipolar mode (adc0con1.5 = 1) 0 C 1.024 v ref /gain v v ref = refin(+) ? refin(?) or refin2(+) ? refin2(?) (or int 1.25 v ref ) adc range matching 2 v ain = 18 mv, chop enabled common-mode rejection dc chop enabled, chop disabled on ain 95 db ain = 7.8 mv, range = 20 mv 113 db ain = 1 v, range = 2.56 v common-mode rejection 50 hz/60 hz 2 50 hz/60 hz 1 hz, 16.6 hz and 50 hz update rate, chop enabled, rej60 enabled on ain 95 db ain = 7.8 mv, range = 20 mv 90 db ain = 1 v, range = 2.56 v footnotes at end of table.
ADUC845/aduc847/aduc848 rev. a | page 5 of 108 parameter min typ max unit conditions normal mode rejection 50 hz/60 hz 2 on ain 75 db 50 hz/60 hz 1 hz, 16.6 hz fadc, sf = 52h, chop on, rej60 on 100 db 50 hz 1 hz, 16.6 hz fadc, sf = 52h, chop on 67 db 50 hz/60 hz 1 hz, 50 hz fadc, sf = 52h, chop off, rej60 on 100 db 50 hz 1 hz, 50 hz fadc, sf = 52h, chop off analog input current 2 1 na t max = 85c, buffer on 5 na t max = 125c, buffer on analog input current drift 5 pa/c t max = 85c, buffer on 15 pa/c t max = 125c, buffer on average input current 125 na/v 2.56 v range, buffer bypassed average input current drift 2 pa/v/c buffer bypassed absolute ain voltage limits 2 a gnd + 0.1 av dd ? 0.1 v ain1ain10 and aincom with buffer enabled absolute ain voltage limits 2 a gnd ? 0.03 av dd + 0.03 v ain1ain10 and aincom with buffer bypassed external reference inputs refin(+) to refin(C) voltage 2.5 v refin refers to both refin and refin2 refin(+) to refin(C) range 2 1 av dd v refin refers to both refin and refin2 average reference input current 1 a/v both adcs enabled average reference input current drift 0.1 na/v/c noxref trigger voltage 0.3 0.65 v noxref (adcstat.4) bit active if v ref > 0.3 v, and inactive if v ref > 0.65 v common-mode rejection dc rejection 125 db ain = 1 v, range = 2.56 v 50 hz/60 hz rejection 2 90 db 50 hz/60 hz 1 hz, ain = 1 v, range = 2.56 v, sf = 82 normal mode rejection 50 hz/60 hz 2 75 db 50 hz/60 hz 1 hz, ain = 1 v, range = 2.56 v, sf = 52h, chop on, rej60 on 100 db 50 hz 1 hz, ain = 1 v, range = 2.56 v, sf = 52h, chop on 67 db 50 hz/60 hz 1 hz, ain = 1 v, range = 2.56 v, sf = 52h, chop off, rej60 on 100 db 50 hz 1 hz, ain = 1 v, range = 2.56 v, sf = 52h, chop off auxiliary adc (ADUC845 only) conversion rate 5.4 105 hz chop on 16.06 1365 hz chop off no missing codes 2 24 bits 26.7 hz update rate, chop enabled 24 bits 80.3 hz update rate, chop disabled resolution see table 19 and table 21 output noise see table 18 and table 20 output no ise varies with selected update rates. integral nonlinearity 15 ppm of fsr 1 lsb 16 offset error 3 3 v chop on 0.25 lsb 16 chop off offset error drift 2 10 nv/c chop on 200 nv/c chop off full-scale error 4 0.5 lsb 16 gain error drift 4 0.5 ppm/c power supply rejection 80 db ain = 1 v, range = 2.56 v, chop enabled 80 db ain = 1 v, range = 2.56 v, chop disabled footnotes at end of table.
ADUC845/aduc847/aduc848 rev. a | page 6 of 108 parameter min typ max unit conditions auxiliary adc analog inputs (ADUC845 only) differential input voltage ranges 5, 6 bipolar mode (adc1con.5 = 0) v ref v refin = refin(+) ? refin(?) (or int 1.25 v ref ) unipolar mode (adc1con.5 = 1) 0 C v ref v refin = refin(+) ? refin(?) (or int 1.25 v ref ) average analog input current 125 na/v analog input current drift 2 pa/v/c absolute ain/aincom voltage limits 2, 7 a gnd ? 0.03 av dd + 0.03 v normal mode rejection 50 hz/60 hz 2 on ain and refin 75 db 50 hz/60 hz 1 hz, 16.6 hz fadc, sf = 52h, chop on, rej60 on 100 db 50 hz 1 hz, 16.6 hz fadc, sf = 52h, chop on 67 db 50 hz/60 hz 1 hz, 50 hz fadc, sf = 52h, chop off, rej60 on 100 db 50 hz 1 hz, 50 hz fadc, sf = 52h, chop off adc system calibration full-scale calibration limit +1.05 fs v zero-scale calibration limit ?1.05 fs v input span 0.8 fs 2.1 fs v dac voltage range 0 C v ref v daccon.2 = 0 0 C av dd v daccon.2 = 1 resistive load 10 k? from dac output to agnd capactive load 100 pf from dac output to agnd output impedance 0.5 ? i sink 50 a dc specifications 8 resolution 12 bits relative accuracy 3 lsb differential non linearity ?1 lsb guaranteed 12-bit monotonic offset error 50 mv gain error 1 % av dd range 1 % v ref range ac specifications 2, 8 voltage output settling time 15 s se ttling time to 1 lsb of final value digital-to-analog glitch energy 10 nvs 1 lsb change at major carry internal reference adc reference chop enabled reference voltage 1.25 ? 1% 1.25 1.25 + 1% v initial tolerance @ 25c, v dd = 5 v power supply rejection 45 db reference tempco 100 ppm/c dac reference reference voltage 2.5 C 1% 2.5 2.5 + 1% 1% v initial tolerance @ 25c, v dd = 5 v power supply rejection 50 db reference tempco 100 ppm/c temperature sensor (ADUC845 only) accuracy 2 c thermal impedance 90 c/w mqfp package 52 c/w csp package footnotes at end of table.
ADUC845/aduc847/aduc848 rev. a | page 7 of 108 parameter min typ max unit conditions transducer burnout current sources ain+ current ?100 na ain+ is the selected positive input (ain4 or ain6 only) to the primary adc ain? current 100 na ain? is the selected negative input (ain5 or ain7 only) to the primary adc initial tolerance at 25c 10 % drift 0.03 %/c excitation current sources output current 200 a available from each current source initial tolerance at 25c 10 % drift 200 ppm/c initial current matching at 25c 1 % matching between both current sources drift matching 20 ppm/c line regulation (av dd ) 1 a/v av dd = 5 v 5% load regulation 0.1 a/v output compliance 2 agnd av dd ? 0.6 v power supply monitor (psm) av dd trip point selection range 2.63 4.63 v four trip points selectable in this range av dd trip point accuracy 3.0 % t max = 85c 4.0 % t max = 125c dv dd trip point selection range 2.63 4.63 v four trip points selectable in this range dv dd trip point accuracy 3.0 % t max = 85c 4.0 % t max = 125c crystal oscillator (xtal1 and xtal2) logic inputs, xtal1 only 2 v inl , input low voltage 0.8 v dv dd = 5 v 0.4 v dv dd = 3 v v inh , input low voltage 3.5 v dv dd = 5 v 2.5 v dv dd = 3 v xtal1 input capacitance 18 pf xtal2 output capacitance 18 pf logic inputs all inputs except sclock, reset, and xtal1 2 v inl , input low voltage 0.8 v dv dd = 5 v 0.4 v dv dd = 3 v v inh , input low voltage 2.0 v sclock and reset only (schmidt triggered inputs) 2 v t+ 1.3 3.0 v dv dd = 5 v 0.95 2.5 v dv dd = 3 v v t? 0.8 1.4 v dv dd = 5 v 0.4 1.1 v dv dd = 3 v v t+ ? v t? 0.3 0.85 v dv dd = 5 v or 3 v input currents port 0, p1.0 to p1.7, ea 10 a v in = 0 v or v dd reset 10 a v in = 0 v, dv dd = 5 v 35 105 a v in = dv dd , dv dd = 5 v, internal pull-down port 2, port 3 10 a v in = dv dd , dv dd = 5 v ?180 ?660 a v in = 2 v, dv dd = 5 v ?20 ?75 a v in = 0.45 v, dv dd = 5 v input capacitance 10 pf all digital inputs
ADUC845/aduc847/aduc848 rev. a | page 8 of 108 parameter min typ max unit conditions logic outputs (all digital outputs except xtal2) v oh , output high voltage 2 2.4 v dv dd = 5 v, i source = 80 a 2.4 v dv dd = 3 v, i source = 20 a v ol , output low voltage 0.4 v i sink = 8 ma, sclock, sdata 0.4 v i sink = 1.6 ma on p0, p1, p2 floating state leakage current 2 10 a floating state output capacitance 10 pf start-up time at power-on 600 ms after ext reset in normal mode 3 ms after wdt reset in normal mode 2 ms controlled via wdcon sfr from power-down mode oscillator running pllcon.7 = 0 wake-up with int0 interrupt 20 s wake-up with spi interrupt 20 s wake-up with tic interrupt 20 s oscillator powered down pllcon.7 = 1 wake-up with int0 interrupt 30 s wake-up with spi interrupt 30 s flash/ee memory reliability characteristics endurance 9 100,000 cycles data retention 10 100 years power requirements power supply voltages av dd 3 v nominal 2.7 3.6 v av dd 5 v nominal 4.75 5.25 v dv dd 3 v nominal 2.7 3.6 v dv dd 5 v nominal 4.75 5.25 v 5 v power consumption 4.75 v < dv dd < 5.25 v, av dd = 5.25 v normal mode 11, 12 dv dd current 10 ma core clock = 1.57 mhz 25 31 ma core clock = 12.58 mhz av dd current 180 a power-down mode 11, 12 dv dd current 40 53 a t max = 85c; osc on; tic on 50 a t max = 125c; osc on; tic on 20 33 a t max = 85c; osc off 30 a t max = 125c; osc off av dd current 1 a t max = 85c; osc on or off 3 a t max = 125c; osc on or off typical additional peripheral currents (ai dd and di dd ) 5 v v dd , cd = 3 primary adc 1 ma auxiliary adc (ADUC845 only) 0.5 ma power supply monitor 30 a dac 60 a dach/l = 000h dual excitation current sources 200 a 200 a each. can be combined to give 400 a on a single output. ale off ?20 a pcon.4 = 1 (see table 6) wdt 10 a footnotes at end of table.
ADUC845/aduc847/aduc848 rev. a | page 9 of 108 parameter min typ max unit conditions pwm ?fxtal 3 a ?fvco 0.5 ma tic 1 a 3 v power consumption 2.7 v < dv dd < 3.6 v, av dd = 3.6 v normal mode 11, 12 dv dd current 4.8 ma core clock = 1.57 mhz 9 11 ma core clock = 6.29 mhz (cd = 1) av dd current 180 a adc not enabled power-down mode 11, 12 dv dd current 20 26 a t max = 85c; osc on; tic on 29 a t max = 125c; osc on; tic on 14 20 a t max = 85c; osc off 21 a t max = 125c; osc off av dd current 1 a t max = 85c; osc on or off 3 a t max = 125c; osc on or off 1 temperature range is for ADUC845bs; for the aduc847bs and aduc848bs (mqfp package), the ra nge is C40c to +125c. temperature range for ADUC845bcp, aduc847bcp, an d aduc848bcp (csp package) is C40c to +85c. 2 these numbers are not production tested but are guaranteed by design and/or characterization data on production release. 3 system zero-scale calibration can remove this error. 4 gain error drift is a span drift. to calculate full-scale error drift, add the offset error drift to the gain error drift time s the full-scale input. 5 in general terms, the bipolar input voltage range to the primary adc is given by the adc range = (v ref 2 rn )/1.25, where: v ref = refin(+) to refin(C) voltage and v ref = 1.25 v when internal adc v ref is selected. rn = decimal equivalent of rn2, rn1, rn0. for example, if v ref = 2.5 v and rn2, rn1, rn0 = 1, 1, 0, respectively, then the adc range = 1.28 v. in unipolar mode, the effective range is 0 v to 1.28 v in this example. 6 1.25 v is used as the reference voltage to the adc when internal v ref is selected via xref0/xref1 or axref bits in adc0con2 and adc1con, respectively. (axref is available only on the ADUC845.) 7 in bipolar mode, the auxiliary adc can be driven only to a minimum of agnd C 30 mv as indicated by the auxiliary adc absolute ain voltage limits. the bipolar range is still Cv ref to +v ref . 8 dac linearity and ac specifications are calculated using a reduced code range of 48 to 4095, 0 v to v ref , reduced code range of 100 to 3950, 0 v to vdd. 9 endurance is qualified to 100 kcycle per jedec std. 22 method a 117 and measured at C40c, +25c, +85c, and +125c. typical en durance at 25c is 700 kcycles. 10 retention lifetime equivalent at junction temperature (t j ) = 55c per jedec std. 22, method a117. retention lifetime based on an activation energy of 0.6 ev derates with junction temperature. 11 power supply current consumption is measured in normal mode following the power-on sequence, and in power-down modes under the following conditions: normal mode: reset = 0.4 v, digital i/o pins = open circuit, core clk changed via cd bits in pllcon, core executing internal so ftware loop. power-down mode: reset = 0.4 v, all p0 pins and p1.2 to p1.7 pins = 0.4 v. all other digital i/o pins are open circuit, core cl k changed via cd bits in pllcon, pcon.1 = 1, core execution suspended in power-down mode, osc turned on or off via osc_pd bit (pllcon.7) in pllcon sfr. 12 dv dd power supply current increases typically by 3 ma (3 v operation) and 10 ma (5 v operation) duri ng a flash/ee memory program or erase cycle. general notes about specifications ? dac gain error is a measure of the span error of the dac. ? the ADUC845bcp, aduc847bcp, and aduc848bcp (csp package) ha ve been qualified and tested with the base of the csp package floating. the base of the csp package should be soldered to the board, but left floating electrically, to ensure good mechanical stability. ? flash/ee memory reliability characteristics apply to both the flash/ee program memory and flash/ee data memory.
ADUC845/aduc847/aduc848 rev. a | page 10 of 108 abosolute maximum ratings t a = 25c, unless otherwise noted. table 2. parameter rating av dd to agnd C0.3 v to +7 v av dd to dgnd C0.3 v to +7 v dv dd to dgnd C0.3 v to +7 v dv dd to dgnd C0.3 v to +7 v agnd to dgnd 1 C0.3 v to +0.3 v av dd to dv dd C2 v to +5 v analog input voltage to agnd 2 C0.3 v to av dd + 0.3 v reference input voltage to agnd C0.3 v to av dd + 0.3 v ain/refin current (indefinite) 30 ma digital input voltage to dgnd C0.3 v to dv dd + 0.3 v digital output voltage to dgnd C0.3 v to dv dd + 0.3 v operating temperature range C40c to +125c storage temperature range C65c to +150c junction temperature 150c ja thermal impedance (mqfp) 90c/w ja thermal impedance (lfcsp) 52c/w lead temperature, soldering vapor phase (60 sec) 215c infrared (15 sec) 220c stresses above those listed under absolute maximum ratings may cause permanent damage to the device. this is a stress rating only; functional operation of the device at these or any other conditions above those listed in the operational sections of this specification is not implied. exposure to absolute maximum rating conditions for extended periods may affect device reliability. ________________________ 1 agnd and dgnd are shorted internally on the ADUC845, aduc847, and aduc848. 2 applies to the p1.0 to p1.7 pins operating in analog or digital input modes. esd caution esd (electrostatic discharge) sensitive device. electros tatic charges as high as 4000 v readily accumulate on the human body and test equipment and can discharge wi thout detection. although this product features proprietary esd protection circuitry, permanent damage may occur on devices subjected to high energy electrostatic discharges. therefore, proper esd precautions are recommended to avoid performance degradation or loss of functionality.
ADUC845/aduc847/aduc848 rev. a | page 11 of 108 pin configuration and fu nction descriptions 52 51 50 49 48 43 42 41 40 47 46 45 44 14 15 16 17 18 19 20 21 22 23 24 25 26 1 2 3 4 5 6 7 8 9 10 11 13 12 pin 1 identifier top view (not to scale) 39 38 37 36 35 34 33 32 31 30 29 28 27 p0.7/ad 7 p0.6/ad 6 p0.5/ad 5 p0.4/ad 4 dv dd dgnd p0.3/ad 3 p0.2/ad 2 p0.1/ad1 p0.0/ad 0 ale psen ea dac reset p3.0/rxd p3.1/txd p3.2/int0 p3.3/int1 dv dd p3.4/t0 p3.5/t1 p3.6/wr p3.7/rd sclock (i 2 c) p1.0/ain1 p1.1/ain2 p1.2/ain3/refin2+ p1.3/ain4/refin2? av dd agnd refin? refin+ p1.4/ain5 p1.5/ain6 p1.6/ain7/iexc1 p1.7/ain8/iexc2 aincom/dac p2.7/pwmclk p2.6/pwm1 p2.5/pwm0 p2.4/t2ex dgnd dv dd xtal2 xtal1 p2.3/ss/t2 p2.2/miso p2.1/mosi p2.0/sclock (spi) sdata dgnd 04741-0-002 ADUC845/aduc847/aduc848 figure 2. 52-lead mqfp pin configuration p1.1/ain2 p1.2/ain3/refin2+ p1.3/ain4/refin2? agnd av dd agnd refin? refin+ p1.4/ain5 p1.5/ain6 p1.6/ain7/iexc1 p1.7/ain8/iexc2 aincom/dac dac ain9 ain10 reset p3.0/rxd p3.1/txd p3.2/int0 p3.2/int1 dv dd dgnd p3.4/t0 p3.5/t1 p3.6/wr p3.7/rd sclk(i 2 c) p2.7/pwmclk p2.6/pwm1 p2.5/pwm0 p2.4/t2ex dgnd dgnd dv dd xtal1 p2.3/ss/t2 p2.2/miso p2.1/mosi p2.0/sclock (spi) sdata p1.0/ain1 p0.7/ad7 p0.6/ad6 p0.5/ad5 p0.4/ad4 dv dd dgnd p0.3/ad3 p0.2/ad2 p0.1/ad1 p0.0/ad0 ale psen ea 14 1 2 3 4 5 6 7 8 9 10 11 13 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 42 41 40 39 38 37 36 35 34 33 32 31 30 29 43 45 46 47 48 49 50 51 52 53 54 55 56 pin 1 identifier 44 xtal2 top view (not to scale) 04741-0-003 ADUC845/aduc847/aduc848 figure 3. 56-lead csp pin configuration table 3. pin function descriptions pin no: 52-mqfp pin no: 56-csp mnemonic type 1 description 1 56 p1.0/ain1 i by power-on default, p1.0/ain1 is configured as the ain1 analog input. ain1 can be used as a pseudo differenti al input when used with aincom or as the positive input of a fully differen tial pair when used with ain2. p1.0 has no digital output driver. it can function as a digital input for which 0 must be written to the port bit. as a digita l input, this pin must be driven high or low externally. 2 1 p1.1/ain2 i on power-on default, p1.1/ain2 is configured as the ain2 analog input. ain2 can be used as a pseudo differenti al input when used with aincom or as the negative input of a fully differen tial pair when used with ain1. p1.1 has no digital output driver. it can function as a digital input for which 0 must be written to the port bit. as a digita l input, this pin must be driven high or low externally. 3 2 p1.2/ain3/refin2+ i on power-on default, p1.2/a in3 is configured as the ain3 analog input. ain3 can be used as a pseudo differenti al input when used with aincom or as the positive input of a fully differen tial pair when used with ain4. p1.2 has no digital output driver. it can function as a digital input for which 0 must be written to the port bit. as a digita l input, this pin must be driven high or low externally. this pin also functions as a second external differential reference input, positive terminal. 4 3 p1.3/ain4/refin2? i on power-on default, p1.3/a in4 is configured as the ain4 analog input. ain4 can be used as a pseudo differenti al input when used with aincom or as the negative input of a fully differen tial pair when used with ain3. p1.3 has no digital output driver. it can function as a digital input for which 0 must be written to the port bit. as a digita l input, this pin must be driven high or low externally. this pin also functions as a second external differential reference input, negative terminal. 5 4 av dd s analog supply voltage. 6 5 agnd s analog ground. --- 6 agnd s a second analog ground is provided with the csp version only. footnotes at end of table.
ADUC845/aduc847/aduc848 rev. a | page 12 of 108 pin no: 52-mqfp pin no: 56-csp mnemonic type 1 description 7 7 refin? i external differential reference input, negative terminal. 8 8 refin+ i external differential reference input, positive terminal. 9 9 p1.4/ain5 i on power-on default, p1.4/ain5 is configured as the ain5 analog input. ain5 can be used as a pseudo differenti al input when used with aincom or as the positive input of a fully differen tial pair when used with ain6. p1.0 has no digital output driver. it can function as a digital input for which 0 must be written to the port bit. as a digita l input, this pin must be driven high or low externally. 10 10 p1.5/ain6 i on power-on default, p1.5/ain6 is configured as the ain6 analog input. ain6 can be used as a pseudo differenti al input when used with aincom or as the negative input of a fully differen tial pair when used with ain5. p1.1 has no digital output driver. it can function as a digital input for which 0 must be written to the port bit. as a digita l input, this pin must be driven high or low externally. 11 11 p1.6/ain7/iexc1 i/o on power-on default, p1.6/a in7 is configured as the ain7 analog input. ain7 can be used as a pseudo differenti al input when used with aincom or as the positive input of a fully differential pair when used with ain8. one or both current sources can also be configured at this pin. p1.6 has no digital output driver. it can, however, function as a digital input for which 0 must be written to the port bit. as a digital input, this pin must be driven high or low externally. 12 12 p1.7/ain8/iexc2 i/o on power-on default, p1.7/a in8 is configured as the ain8 analog input. ain8 can be used as a pseudo differenti al input when used with aincom or as the negative input of a fully differential pair when used with ain7. one or both current sources can also be configured at this pin. p1.7 has no digital output driver. it can, however, function as a digital input for which 0 must be written to the port bit. as a digital input, this pin must be driven high or low externally. 13 13 aincom/dac i/o all analog inputs can be referred to this pin, provided that a relevant pseudo differential input mode is selected. this pin also functions as an alternative pin out for the dac. 14 14 dac o the voltage output from the dac, if enabled, appears at this pin. ---- 15 ain9 i ain9 can be used as a pseudo differenti al analog input when used with aincom or as the positive input of a fully differ ential pair when used with ain10 (csp version only). ---- 16 ain10 i ain10 can be used as a pseudo differ ential analog input when used with aincom or as the negative input of a fully differential pair when used with ain9 (csp version only). 15 17 reset i reset input. a high level on this pin for 16 core clock cycles while the oscillator is running resets the device. this pin has an internal weak pull-down and a schmitt trigger input stage. 16C19 22C25 18C21 24C27 p3.0Cp3.7 i/o p3.0 to p3.7 are bidirectional port pins with internal pull-up resistors. port 3 pins that have 1s written to them are pulled high by the internal pull-up resistors, and in that state can be used as inp uts. as inputs, port 3 pins being pulled externally low source current because of the internal pull-up resistors. when driving a 0-to-1 output transition, a strong pull-up is active for one core clock period of the instruction cycle. port 3 pins also have the various secondary functions described below. 16 18 p3.0/rxd receiver data for uart serial port. 17 19 p3.1/txd transmitter data for uart serial port. 18 20 p3.2/int0 external interrupt 0. this pin can also be used as a gate control input to timer 0. 19 21 p3.3/int1 external interrupt 1. this pin can also be used as a gate control input to timer 1. 22 24 p3.4/t0 timer/counter 0 external input. 23 25 p3.5/t1 timer/counter 1 external input. 24 26 p3.6/wr external data memory write strobe. this pin latches the data byte from port 0 into an external data memory.
ADUC845/aduc847/aduc848 rev. a | page 13 of 108 pin no: 52-mqfp pin no: 56-csp mnemonic type 1 description 25 27 p3.7/rd external data memory read strobe. this pin enables the data from an external data memory to port 0. 20, 34, 48 22, 36, 51 dv dd s digital supply voltage. 21, 35, 47 23, 37, 38, 50 dgnd s digital ground. 26 28 sclk (i 2 c) i/o serial interface clock for the i 2 c interface. as an input, this pin is a schmitt- triggered input. a weak in ternal pull-up is present on this pin unless it is outputting logic low. this pin can also be controlled in software as a digital output pin. 27 29 sdata i/o serial data pin for the i 2 c interface. as an input, this pin has a weak internal pull- up present unless it is outputting logic low. 28C31, 36C39 30C33, 39C42 p2.0Cp2.7 i/o port 2 is a bidirectional port with internal pull-up resistors. port 2 pins that have 1s written to them are pulled high by the internal pull-up resistors, and in that state can be used as inputs. as inputs, port 2 pins being pulled externally low source current because of th e internal pull-up resistors. port 2 emits the middle and high-order address bytes during accesses to the 24-bit external data memory space. port 2 pins also have the various secondary functions described below. 28 30 p2.0/sclock (spi) serial interface clock for the spi interface. as an input this pin is a schmitt- triggered input. a weak in ternal pull-up is present on this pin unless it is outputting logic low. 29 31 p2.1/mosi serial master output/slave input data fo r the spi interface. a strong internal pull-up is present on this pin when the spi interface outputs a logic high. a strong internal pull-down is present on this pin when the spi interface outputs a logic low. 30 32 p2.2/miso master input/slave output for the spi interf ace. a weak pull-up is present on this input pin. 31 33 p2.3/ss /t2 slave select input for the spi interface. a weak pull-up is present on this pin. for both package options, this pin can also be used to provide a clock input to timer 2. when enabled, counter 2 is incremented in response to a negative transition on the t2 input pin. 36 39 p2.4/t2ex control input to timer 2. when enabled, a negative transition on the t2ex input pin causes a timer 2 capture or reload event. 37 40 p2.5/pwm0 if the pwm is enabled, the pwm0 output appears at this pin. 38 41 p2.6/pwm1 if the pwm is enabled, the pwm1 output appears at this pin. 39 42 p2.7/pwmclk if the pwm is enabled, an exte rnal pwm clock can be provided at this pin. 32 34 xtal1 i input to the crystal oscillator inverter. 33 35 xtal2 o output from the crystal oscillator inverter. see the hardware design considerations section for a description. 40 43 ea external access enable, logic input. wh en held high, this input enables the device to fetch code from internal program memory locations 0000h to f7ffh. no external program memory access is available on the ADUC845, aduc847, or aduc848. to determine the mode of code execution, the ea pin is sampled at the end of an external reset assertion or as part of a device power cycle. ea can also be used as an external emulation i/o pin, and therefore the voltage level at this pin must not be changed during normal operation because this might cause an emulation interrupt that halts code execution. 41 44 psen o program store enable, logic output. this function is not used on the ADUC845, aduc847, or aduc848. this pin remains high during internal program execution. psen can also be used to enable serial download mode when pulled low through a resistor at the end of an external reset assertion or as part of a device power cycle. 42 45 ale o address latch enable, logic output. this output is used to latch the low byte (and page byte for 24-bit data address space accesses) of the address to external memory during external data memory a ccess cycles. it can be disabled by setting the pcon.4 bit in the pcon sfr. footnotes at end of table.
ADUC845/aduc847/aduc848 rev. a | page 14 of 108 pin no: 52-mqfp pin no: 56-csp mnemonic type 1 description 43C46, 49C52 46C49, 52C55 p0.0Cp0.7 i/o these pins are part of port 0, which is an 8-bit open-drain bidirectional i/o port. port 0 pins that have 1s written to them fl oat, and, in that state, can be used as high impedance inputs. an external pull-up resistor is required on p0 outputs to force a valid logic high level externally. port 0 is also the multiplexed low-order address and data bus during accesses to external data memory. in this application, port 0 uses strong in ternal pull-ups when emitting 1s. 1 i = input, o = output, s = supply.
ADUC845/aduc847/aduc848 rev. a | page 15 of 108 general description the ADUC845, aduc847, and aduc848 are single-cycle, 12.58 mips, 8052 core upgrades to the aduc834 and aduc836. they include additional analog inputs for applications requiring more adc channels. the ADUC845, aduc847, and aduc848 are complete smart transducer front ends. the family integrates high resolution - adcs with flexible, up to 10-channel input multiplexing, a fast 8-bit mcu, and program/data flash/ee memory on a single chip. the ADUC845 includes two (primary and auxiliary) 24-bit - adcs with internal buffering and pga on the primary adc. the aduc847 includes the same primary adc as the ADUC845 (auxiliary adc removed). the aduc848 is a 16-bit adc version of the aduc847. the adcs incorporate flexible input multiplexing, a temperature sensor (ADUC845 only), and a pga (primary adc only) allowing direct measurement of low-level signals. the adcs include on-chip digital filtering and programmable output data rates that are intended for measuring wide dynamic range, low frequency signals, such as those in weigh scale, strain gage, pressure transducer, or temperature measurement applications. the devices operate from a 32 khz crystal with an on-chip pll generating a high frequency clock of 12.58 mhz. this clock is routed through a programmable clock divider from which the mcu core clock operating frequency is generated. the micro- controller core is an optimized single-cycle 8052 offering up to 12.58 mips performance while maintaining 8051 instruction set compatibility. the available nonvolatile flash/ee program memory options are 62 kbytes, 32 kbytes, and 8 kbytes. 4 kbytes of nonvolatile flash/ee data memory and 2304 bytes of data ram are also provided on-chip. the program memory can be configured as data memory to give up to 60 kbytes of nv data memory in data logging applications. on-chip factory firmware supports in-circuit serial download and debug modes (via uart), as well as single-pin emulation mode via the ea pin. the ADUC845, aduc847, and aduc848 are supported by the quickstart? development system featuring low cost software and hardware development tools.
ADUC845/aduc847/aduc848 rev. a | page 16 of 108 watchdog timer 2304 bytes user ram power supply monitor temp sensor 200 a 200 a band gap reference v ref detect av dd agnd dv dd dgnd reset por mosi miso ss xtal1 ADUC845 adc primary adc 24-bit - ? adc control and calibration dac dac control 12-bit voltage output dac t0 t1 t2ex t2 int0 int1 ea psen ale single-pin emulator txd rxd 4 kbytes data/ flash/ee 62 kbytes program/ flash/ee uart serial port current source mix single- cycle 8052 mcu core downloader debugger spi serial interface 16-bit counter timers wake-up/ rtc timer pll with prog. clock divider xtal2 osc 2 data pointers 11-bit stack pointer ain mux ain1 ain2 mux pwm0 pwm1 pwm control uart timer sclk sclk sdata i 2 c serial interface 04741-0-004 pga buf buf 56 4 36 51 23 37 38 50 18 17 19 44 43 45 30 31 32 33 28 29 34 35 21 20 39 33 25 24 41 pwmclk 42 40 14 5 6 22 1 ain3 2 ain4 3 ain5 9 ain6 10 ain7 11 ain8 12 p0.0 (ad0) p0.1 (ad1) 46 47 p0.2 (ad2) 48 p0.3 (ad3) 49 p0.4 (ad4) 52 p0.5 (ad5) 53 p0.6 (ad6) 54 p0.7 (ad7) 55 p3.0 (rxd) p3.1 (txd) 16 17 p3.2 (int0) 18 p3.3 (int1) 19 p3.4 (t0) 22 p3.5 (t1) 23 p3.6 (wr) 24 p3.7 (rd) 25 p1.0/ain1 p1.1/ain2 56 1 p1.2/ain3/refin2+ 2 p1.3/ain4/refin2? 3 p1.4/ain5 9 p1.5/ain6 10 p1.6/ain7/iexc1 11 p1.7/ain8/iexc2 12 p2.0/sclk (a8/a16) p2.1/mosi (a9/a17) 30 31 p2.2/miso (a10/a18) 32 p2.3/ss/t2 (a11/a19) 33 p2.4/t2ex (a12/a20) 39 p2.5/pwm0 (a13/a21) 40 p2.6/pwm1 (a14/a22) 41 p2.7/pwmclk (a15/a23) 42 ain9* 15 ain10* 16 a incom 13 dual 16-bit - ? dac dual 16-bit pwm adc control and calibration auxiliary adc 24-bit - ? adc refin+ 8 refin? 7 iexc1 11 iexc1 12 *the pin numbers refer to the csp package only. shaded areas are upgrades from the aduc834, and include a single-cycle core, up to 10 adc input channels (8 on the mqfp package). the auxiliary adc is now 24-bit. figure 4. detailed block diagram of the ADUC845
ADUC845/aduc847/aduc848 rev. a | page 17 of 108 watchdog timer 2304 bytes user ram power supply monitor 200 a 200 a band gap reference v ref detect av dd agnd dv dd reset por mosi miso ss xtal1 aduc847 adc control and calibration dac dac control 12-bit voltage output dac t0 t1 t2ex t2 int0 int1 ea psen ale single-pin emulator txd rxd 4 kbytes data/ flash/ee 62 kbytes program/ flash/ee uart serial port current source mix single- cycle 8052 mcu core downloader debugger spi serial interface 16-bit counter timers wake-up/ rtc timer pll with prog. clock divider xtal2 osc 2 data pointers 11-bit stack pointer ain mux ain1 ain2 mux pwm0 pwm1 pwm control uart timer sclk sclk sdata i 2 c serial interface 04741-a-004 pga buf buf 56 4 36 51 23 dgnd 37 38 50 18 17 19 44 43 45 30 31 32 33 28 29 34 35 21 20 39 33 25 24 41 pwmclk 42 40 14 5 6 22 1 ain3 2 ain4 3 ain5 9 ain6 10 ain7 11 ain8 12 p0.0 (ad0) p0.1 (ad1) 46 47 p0.2 (ad2) 48 p0.3 (ad3) 49 p0.4 (ad4) 52 p0.5 (ad5) 53 p0.6 (ad6) 54 p0.7 (ad7) 55 p3.0 (rxd) p3.1 (txd) 16 17 p3.2 (int0) 18 p3.3 (int1) 19 p3.4 (t0) 22 p3.5 (t1) 23 p3.6 (wr) 24 p3.7 (rd) 25 p1.0/ain1 p1.1/ain2 56 1 p1.2/ain3/refin2+ 2 p1.3/ain4/refin2? 3 p1.4/ain5 9 p1.5/ain6 10 p1.6/ain7/iexc1 11 p1.7/ain8/iexc2 12 p2.0/sclk (a8/a16) p2.1/mosi (a9/a17) 30 31 p2.2/miso (a10/a18) 32 p2.3/ss/t2 (a11/a19) 33 p2.4/t2ex (a12/a20) 39 p2.5/pwm0 (a13/a21) 40 p2.6/pwm1 (a14/a22) 41 p2.7/pwmclk (a15/a23) 42 ain9* 15 ain10* 16 a incom 13 dual 16-bit - ? dac dual 16-bit pwm refin+ 8 refin? 7 iexc1 11 iexc1 12 *the pin numbers refer to the csp package only. primary adc 24-bit - ? adc shaded areas are upgrades from the aduc834, and include a single-cycle core, up to 10 adc input channels (8 on the mqfp package). figure 5. detailed block diagram of the aduc847
ADUC845/aduc847/aduc848 rev. a | page 18 of 108 watchdog timer 2304 bytes user ram power supply monitor 200 a 200 a band gap reference v ref detect av dd agnd dv dd dgnd reset por mosi miso ss xtal1 aduc848 adc control and calibration dac dac control 12-bit voltage output dac t0 t1 t2ex t2 int0 int1 ea psen ale single-pin emulator txd rxd 4 kbytes data/ flash/ee 62 kbytes program/ flash/ee uart serial port current source mix single- cycle 8052 mcu core downloader debugger spi serial interface 16-bit counter timers wake-up/ rtc timer pll with prog. clock divider xtal2 osc 2 data pointers 11-bit stack pointer ain mux ain1 ain2 mux pwm0 pwm1 pwm control uart timer sclk sclk sdata i 2 c serial interface 04741-a-003 pga buf buf 56 4 36 51 23 37 38 50 18 17 19 44 43 45 30 31 32 33 28 29 34 35 21 20 39 33 25 24 41 pwmclk 42 40 14 5 6 22 1 ain3 2 ain4 3 ain5 9 ain6 10 ain7 11 ain8 12 p0.0 (ad0) p0.1 (ad1) 46 47 p0.2 (ad2) 48 p0.3 (ad3) 49 p0.4 (ad4) 52 p0.5 (ad5) 53 p0.6 (ad6) 54 p0.7 (ad7) 55 p3.0 (rxd) p3.1 (txd) 16 17 p3.2 (int0) 18 p3.3 (int1) 19 p3.4 (t0) 22 p3.5 (t1) 23 p3.6 (wr) 24 p3.7 (rd) 25 p1.0/ain1 p1.1/ain2 56 1 p1.2/ain3/refin2+ 2 p1.3/ain4/refin2? 3 p1.4/ain5 9 p1.5/ain6 10 p1.6/ain7/iexc1 11 p1.7/ain8/iexc2 12 p2.0/sclk (a8/a16) p2.1/mosi (a9/a17) 30 31 p2.2/miso (a10/a18) 32 p2.3/ss/t2 (a11/a19) 33 p2.4/t2ex (a12/a20) 39 p2.5/pwm0 (a13/a21) 40 p2.6/pwm1 (a14/a22) 41 p2.7/pwmclk (a15/a23) 42 ain9* 15 ain10* 16 a incom 13 dual 16-bit - ? dac dual 16-bit pwm refin+ 8 refin? 7 iexc1 11 iexc1 12 *the pin numbers refer to the csp package only. shaded areas are upgrades from the aduc834, and include a single-cycle core, up to 10 adc input channels (8 on the mqfp package). primary adc 16-bit - ? adc figure 6. detailed block diagram of the aduc848 8052 instruction set table 4 documents the number of clock cycles required for each instruction. most instructions are executed in one or two clock cycles resulting in 12.58 mips peak performance when operating at pllcon = 00h. timer operation timers on a standard 8052 increment by one with each machine cycle. on the ADUC845, aduc 847, and aduc848, one machine cycle is equal to one clock cycle; therefore, the timers increment at the same rate as the core clock. ale on the aduc834, the output on the ale pin is a clock at 1/6th of the core operating frequency. on the ADUC845, aduc847, and aduc848, the ale pin operates as follows. for a single machine cycle instruction, ale is high for the entire machine cycle. for a two or more machine cycle instruction, ale is high for the first machine cycle and then low for the remainder of the machine cycles. external memory access the ADUC845, aduc847, and aduc848 do not support external program memory access, but the parts can access up to 16 mb (24 address bits) of external data memory. when accessing external ram, the ewait register might need to be programmed in order to give extra machine cycles to movx commands to allow for differing external ram access speeds.
ADUC845/aduc847/aduc848 rev. a | page 19 of 108 complete sfr map reserved reserved reserved reserved reserved reserved reserved reserved reserved reserved not used reserved reserved reserved spicon f8h 05h dacl fbh 00h dach ADUC845 only ADUC845 only ADUC845 only ADUC845 only ADUC845 only ADUC845 only ADUC845 only fch 00h daccon fdh 00h reserved b f0h 00h i2cadd1 f2h 7fh reserved reserved reserved i2ccon e8h 00h gn0l 2 gn0m 2 gn0h 2 gn1l 2 gn1h 2 e9h xxh eah xxh ebh xxh ech xxh edh xxh reserved reserved acc e0h 00h of0l e1h xxh of0m e2h xxh of0h e3h xxh of1l e4h xxh of1h e5h xxh adc0con2 e6h 00h adcstat d8h 00h adc0l d9h 00h adc0m dah 00h adc0h dbh 00h adc1m dch 00h adc1h ddh 00h adc1l deh 00h psw d0h 00h adcmode d1h 08h adc0con1 d2h 07h adc1con d3h 00h sf d4h 45h icon d5h 00h reserved t2con c8h 00h rcap2l cah 00h rcap2h cbh 00h tl2 cch 00h th2 cdh 00h reserved wdcon c0h 10h ip b8h 00h econ b9h 00h edata1 bch 00h edata2 bdh 00h ie a8h 00h ieip2 a9h a 0h p2 a0h ffh scon 98h 00h sbuf 99h 00h i2cdat 9ah 00h p1 90h ffh tcon 88h 00h tmod 89h 00h tl0 8ah 00h tl1 8bh 00h th0 8ch 00h th1 8dh 00h p0 80h ffh sp 81h 07h dpl 82h 00h dph 83h 00h dpp 84h 00h reserved reserved p3 b0h ffh spidat f7h 00h reserved psmcon dfh deh edarl c6h 00h edata3 beh 00h edata4 bfh 00h pcon 87h 00h ispi ffh 0 wcol feh 0 spe fdh 0 spim fch 0 cpol fbh 0 cpha fah spr1 f9h 0 spr0 f8h 0 bits f7h 0 f6h 0 f5h 0 f4h 0 f3h 0 f2h f1h 0 f0h 0 bits mdo efh 0 eeh 0 mco edh 0 ech 0 ebh 0 eah e9h 0 e8h 0 bits e7h 0 e6h 0 e5h 0 e4h 0 e3h 0 e2h e1h 0 e0h 0 bits rdy0 dfh 0 rdy1 deh 0 cal ddh 0 noxref dch 0 err0 dbh 0 err1 dah d9h 0 d8h 0 bits cy d7h 0 ac d6h 0 f0 d5h 0 rs1 d4h 0 rs0 d3h 0 ov d2h fi d1h 0 p d0h 0 bits tf2 cfh 0 exf2 ceh 0 rclk cdh 0 tclk cch 0 exen2 cbh 0 tr2 cah cnt2 c9h 0 cap2 c8h 0 bits pre3 c7h 0 pre2 c6h 0 pre1 c5h 0 c4h 1 wdir c3h 0 wds c2h wde c1h 0 wdwr c0h 0 bits bfh 0 padc beh 0 pt2 bdh 0 ps bch 0 pt1 bbh 0 px1 bah pt0 b9h 0 px0 b8h 0 bits rd b7h 1 wr b6h 1 t1 b5h 1 t0 b4h 1 int1 b3h 1 int0 b2h txd b1h 1 rxd b0h 1 bits ea afh eadc aeh et2 adh es ach 0 et1 abh 0 ex1 aah et0 a9h 0 ex0 a8h 0 bits a7h a6h a5h 1 a4h 1 a3h 1 a2h a1h 1 a0h 1 bits sm0 9fh 0 sm1 9eh 0 sm2 9dh 0 ren 9ch 0 tb8 9bh 0 rb8 9ah ti 99h 0 ri 98h 0 bits 97h 1 96h 1 95h 1 94h 1 93h 1 92h t2ex 91h 1 t2 90h 1 bits tf1 8fh 0 tr1 8eh 0 tf0 8dh 0 tr0 8ch 0 ie1 8bh 0 it1 8ah ie0 89h 0 it0 88h 0 bits 87h 1 86h 1 85h 1 84h 1 83h 1 82h 81h 1 80h 1 bits 1 1 0 1 0 1 ie0 89h 0 it0 88h 0 tcon 88h 00h bit mnemonic bit address reset default bit value mnemonic reset default value sfr address these bits are contained in this byte. sfr map key: sfr note: sfrs whose addresses end in 0h or 8h are bit addressable. 1 these sfrs maintain their pre-reset values after a reset if timecon.0 = 1. 2 calibration coefficients are preconfigured on power-up to factory calibrated values. 1 reserved reserved reserved 0 0 0 0 0 0 0 0 0 0 00 11 timecon hthsec 1 sec 1 min 1 hour 1 intval dpcon a1h a2h a3h a4h a5h a6h a7h 00h 00h 00h 00h 00h 00h 00h reserved reserved reserved reserved reserved reserved pwmcon aeh 00h cfg845/7/8 afh 00h reserved reserved t3fd t3con 9dh 9eh 00h 00h ewait 9fh 00h pwm0l pwm0h pwm1l pwm1h sph 00h 00h 00h 00h 00h b1h b2h b3h b4h b7h reserved reserved reserved chipid c2h a0h edarh c7h 00h mde i2cm reserved pre0 pllcon d7h 53h mdi i2crs i2ctx i2ci i2cadd 9bh 55h 04741-a-005 not available on aduc848 ADUC845 only figure 7. complete sfr map for the ADUC845, aduc847, and aduc848
ADUC845/aduc847/aduc848 rev. a | page 20 of 108 functional description 8051 instruction set table 4. optimized single-cycle 8051 instruction set mnemonic description bytes cycles 1 arithmetic a a,rn add register to a 1 1 add a,@ri add indirect memory to a 1 2 add a,dir add direct byte to a 2 2 add a,#data add immediate to a 2 2 addc a,rn add register to a with carry 1 1 addc a,@ri add indirect memory to a with carry 1 2 addc a,dir add direct byte to a with carry 2 2 add a,#data add immediate to a with carry 2 2 subb a,rn subtract register from a with borrow 1 1 subb a,@ri subtract indirect memory from a with borrow 1 2 subb a,dir subtract direct from a with borrow 2 2 subb a,#data subtract immediate from a with borrow 2 2 inc a increment a 1 1 inc rn increment register 1 1 inc @ri increment indirect memory 1 2 inc dir increment direct byte 2 2 inc dptr increment data pointer 1 3 dec a decrement a 1 1 dec rn decrement register 1 1 dec @ri decrement indirect memory 1 2 dec dir decrement direct byte 2 2 mul ab multiply a by b 1 4 div ab divide a by b 1 9 da a decimal adjust a 1 2 logic anl a,rn and register to a 1 1 anl a,@ri and indirect memory to a 1 2 anl a,dir and direct byte to a 2 2 anl a,#data and immediate to a 2 2 anl dir,a and a to direct byte 2 2 anl dir,#data and immediate data to direct byte 3 3 orl a,rn or register to a 1 1 orl a,@ri or indirect memory to a 1 2 orl a,dir or direct byte to a 2 2 orl a,#data or immediate to a 2 2 orl dir,a or a to direct byte 2 2 orl dir,#data or immediate data to direct byte 3 3 xrl a,rn exclusive-or register to a 1 1 xrl a,@ri exclusive-or indirect memory to a 2 2 xrl a,#data exclusive-or immediate to a 2 2 xrl dir,a exclusive-or a to direct byte 2 2 xrl a,dir exclusive-or indirect memory to a 2 2 xrl dir,#data exclusive-or immediate data to direct 3 3 clr a clear a 1 1 cpl a complement a 1 1 swap a swap nibbles of a 1 1 rl a rotate a left 1 1
ADUC845/aduc847/aduc848 rev. a | page 21 of 108 mnemonic description bytes cycles 1 rlc a rotate a left through carry 1 1 rr a rotate a right 1 1 rrc a rotate a right through carry 1 1 data transfer mov a,rn move register to a 1 1 mov a,@ri move indirect memory to a 1 2 mov rn,a move a to register 1 1 mov @ri,a move a to indirect memory 1 2 mov a,dir move direct byte to a 2 2 mov a,#data move immediate to a 2 2 mov rn,#data move register to immediate 2 2 mov dir,a move a to direct byte 2 2 mov rn, dir move register to direct byte 2 2 mov dir, rn move direct to register 2 2 mov @ri,#data move immediate to indirect memory 2 2 mov dir,@ri move indirect to direct memory 2 2 mov @ri,dir move direct to indirect memory 2 2 mov dir,dir move direct byte to direct byte 3 3 mov dir,#data move immediate to direct byte 3 3 mov dptr,#data move immediate to data pointer 3 3 movc a,@a+dptr move code byte relative dptr to a 1 4 movc a,@a+pc move code byte relative pc to a 1 4 movx 2 a,@ri move external (a8) data to a 1 4 movx 2 a,@dptr move external (a16) data to a 1 4 movx 2 @ri,a move a to external data (a8) 1 4 movx 2 @dptr,a move a to external data (a16) 1 4 push dir push direct byte onto stack 2 2 pop dir pop direct byte from stack 2 2 xch a,rn exchange a and register 1 1 xch a,@ri exchange a and indirect memory 1 2 xchd a,@ri exchange a and indirect memory nibble 1 2 xch a,dir exchange a and direct byte 2 2 boolean clr c clear carry 1 1 clr bit clear direct bit 2 2 setb c set carry 1 1 setb bit set direct bit 2 2 cpl c complement carry 1 1 cpl bit complement direct bit 2 2 anl c,bit and direct bit and carry 2 2 anl c,/bit and direct bit inverse to carry 2 2 orl c,bit or direct bit and carry 2 2 orl c,/bit or direct bit inverse to carry 2 2 mov c,bit move direct bit to carry 2 2 mov bit,c move carry to direct bit 2 2 branching jmp @a+dptr jump indirect relative to dptr 1 3 ret return from subroutine 1 4 reti return from interrupt 1 4 acall addr11 absolute jump to subroutine 2 3 ajmp addr11 absolute jump unconditional 2 3 footnotes at end of table.
ADUC845/aduc847/aduc848 rev. a | page 22 of 108 mnemonic description bytes cycles 1 sjmp rel short jump (relative address) 2 3 jc rel jump on carry = 1 2 3 jnc rel jump on carry = 0 2 3 jz rel jump on accumulator = 0 2 3 jnz rel jump on accumulator ! = 0 2 3 djnz rn,rel decrement register, jnz relative 2 3 ljmp long jump unconditional 3 4 lcall 3 addr16 long jump to subroutine 3 4 jb bit,rel jump on direct bit = 1 3 4 jnb bit,rel jump on direct bit = 0 3 4 jbc bit,rel jump on direct bit = 1 and clear 3 4 cjne a,dir,rel compare a, direct jne relative 3 4 cjne a,#data,rel compare a, immediate jne relative 3 4 cjne rn,#data,rel compare register, immediate jne relative 3 4 cjne @ri,#data,rel compare indirect, immediate jne relative 3 4 djnz dir,rel decrement direct byte, jnz relative 3 4 miscellaneous nop no operation 1 1 1 one cycle is one clock. 2 movx instructions are four cycles when they have 0 wait state. cycles of movx instructions are 4 + n cycles when they have n wait states as programmed via ewait. 3 lcall instructions are three cycles when the lcall instruction comes from an interrupt. memory organization the ADUC845, aduc847, and aduc848 contain four memory blocks: ? 62 kbytes/32 kbytes/8 kbytes of on-chip flash/ee program memory ? 4 kbytes of on-chip flash/ee data memory ? 256 bytes of general-purpose ram ? 2 kbytes of internal xram flash/ee program memory the parts provide up to 62 kbytes of flash/ee program memory to run user code. all further references to flash/ee program memory assume the 62-kbyte option. when ea is pulled high externally during a power cycle or a hardware reset, the parts default to code execution from their internal 62 kbytes of flash/ee program memory. the parts do not support the rollover from internal code space to external code space. no external code space is available on the parts. permanently embedded firmware allows code to be serially downloaded to the 62 kbytes of internal code space via the uart serial port while the device is in-circuit. no external hardware is required. during run time, 56 kbytes of the 62-kbyte program memory can be reprogrammed. this means that the code space can be upgraded in the field by using a user-defined protocol running on the parts, or it can be used as a data memory. for details, see the nonvolatile flash/ee memory section. flash/ee data memory the user has 4 kbytes of flash/ee data memory available that can be accessed indirectly by using a group of registers mapped into the special function register (sfr) space. for details, see the nonvolatile flash/ee memory section. general-purpose ram the general-purpose ram is divided into two separate memories, the upper and the lower 128 bytes of ram. the lower 128 bytes of ram can be accessed through direct or indirect addressing. the upper 128 bytes of ram can be accessed only through indirect addressing becuase it shares the same address space as the sfr space, which must be accessed through direct addressing. the lower 128 bytes of internal data memory are mapped as shown in figure 8. the lowest 32 bytes are grouped into four banks of eight registers addressed as r0 to r7. the next 16 bytes (128 bits), locations 20h to 2fh above the register banks, form a block of directly addressable bit locations at bit addresses 00h to 7fh. the stack can be located anywhere in the internal memory address space, and the stack depth can be expanded up to 2048 bytes. reset initializes the stack pointer to location 07h. any call or push pre-increments the sp before loading the stack. therefore, loading the stack starts from location 08h, which is also the first register (r0) of register bank 1. thus, if one is going to use more than one register bank, the stack pointer should be initialized to an area of ram not used for data storage.
ADUC845/aduc847/aduc848 rev. a | page 23 of 108 11 10 01 00 07h 0fh 17h 1fh 2fh 7fh 00h 08h 10h 18h 20h reset value of stack pointer 30h four banks of eight registers r0 to r7 bit-addressable (bit addresses) general-purpose area banks selected via bits in psw 04741-0-008 figure 8. lower 128 bytes of internal data memory internal xram the ADUC845, aduc847, and aduc848 contain 2 kbytes of on-chip extended data memory. this memory, although on- chip, is accessed via the movx instruction. the 2 kbytes of internal xram are mapped into the bottom 2 kbytes of the external address space if the cfg84x.0 (table 7) bit is set; otherwise, access to the external data memory occurs just like a standard 8051. even with the cfg84x.0 bit set, access to the external (off chip), xram occurs once the 24-bit dptr is greater than 0007ffh. external data memory space (24-bit address space) 000000h ffffffh cfg845/7/8.0 = 0 external data memory space (24-bit address space) 000000h ffffffh cfg845/7/8.0 = 1 0007ffh 000800h 2 kbytes on-chip xram 04741-0-009 figure 9. internal and external xram when enabled and when accessing the internal xram, the p0 and p2 port pin operations, as well as the rd and wr strobes, do not operate as a standard 8051 movx instruction. this allows the user to use these port pins as standard i/o. the internal xram can be configured as part of the extended 11-bit stack pointer. by default, the stack operates exactly like an 8052 in that it rolls over from ffh to 00h in the general-purpose ram. on the ADUC845, aduc847, and aduc848, however, it is possible (by setting cfg845.7/aduc847.7/aduc848.7) to enable the 11-bit extended stack pointer. in this case, the stack rolls over from ffh in ram to 0100h in xram. the 11-bit stack pointer is visible in the sph and sp sfrs. the sp sfr is located at 81h as with a standard 8052. the sph sfr is located at b7h. the 3 lsbs of the sph sfr contain the 3 extra bits necessary to extend the 8-bit stack pointer in the sp sfr into an 11-bit stack pointer. upper 1792 bytes of on-chip xram (data + stack for exsp = 1, data only for exsp = 0) 256 bytes of on-chip data ram (data + stack) lower 256 bytes of on-chip xram (data only) 00h ffh 00h 07ffh cfg845/7/8.7 = 0 100h 04741-0-010 cfg845/7/8.7 = 1 figure 10. extended stack pointer operation external data memory (external xram) there is no support for external program memory access to the parts. however, just like a standard 8051 compatible core, the ADUC845/aduc847/aduc848 can access external data memory using a movx instruction. the movx instruction automatically outputs the various control strobes required to access the data memory. the parts, however, can access up to 16 mbytes of external data memory. this is an enhancement of the 64 kbytes of external data memory space available on a standard 8051 compatible core. see the hardware design considerations section for details. when accessing external ram, the ewait register might need to be programmed to give extra machine cycles to the movx operation. this is to account for differing external ram access speeds. ewait sfr sfr address: 9fh power-on default: 00h bit addressable: no this special function register (sfr), when programmed, dictates the number of wait states for the movx instruction. the value can vary between 0h and 7h. the movx instruction increases by one machine cycle (4 + n , where n = ewait number in decimal) for every increase in the ewait value.
ADUC845/aduc847/aduc848 rev. a | page 24 of 108 special function registers (sfrs) the sfr space is mapped into the upper 128 bytes of internal data memory space and accessed by direct addressing only. it provides an interface between the cpu and all on-chip periph- erals. a block diagram showing the programming model of the ADUC845/aduc847/aduc84 8 via the sfr area is shown in figure 11. all registers except the program counter (pc) and the four general-purpose register banks reside in the sfr area. the sfr registers include control, configuration, and data registers that provide an interface between the cpu and all on-chip peripherals. 128-byte special function register area 62-kbyte electrically reprogrammable nonvolatile flash/ee program memory 8051 compatible core other on-chip peripherals temperature sensor current sources 12-bit dac serial i/o wdt psm tic pwm - ? adc 4-kbyte electrically reprogrammable nonvolatile flash/ee data memory 256 bytes ram 2kbytes xram 04741-0-011 figure 11. programming model accumulator sfr (acc) acc is the accumulator register, which is used for math opera- tions including addition, subtraction, integer multiplication and division, and boolean bit manipulations. the mnemonics for accumulator-specific instructions usually refer to the accumulator as a. b sfr (b) the b register is used with the accumulator for multiplication and division operations. for other instructions, it can be treated as a general-purpose scratch pad register. data pointer (dptr) the data pointer is made up of three 8-bit registers: dpp (page byte), dph (high byte), and dpl (low byte). these provide memory addresses for internal code and data memory access. the dptr can be manipulated as a 16-bit register (dptr = dph, dpl), although inc dptr instructions automatically carry over to dpp, or as three independent 8-bit registers (dpp, dph, dpl). the ADUC845/aduc847/aduc848 supports dual data pointers. see the dual data pointers section. stack pointer (sp and sph) the sp sfr is the stack pointer, which is used to hold an internal ram address called the top of the stack . the sp register is incremented before data is stored during push and call executions. although the stack can reside anywhere in on-chip ram, the sp register is initialized to 07h after a reset. this causes the stack to begin at location 08h. as mentioned earlier, the parts offer an extended 11-bit stack pointer. the 3 extra bits needed to make up the 11-bit stack pointer are the 3 lsbs of the sph byte located at b7h. to enable the sph sfr, the exsp (cfg84x.7) bit must be set; otherwise, the sph sfr can be neither written to nor read from. program status word (psw) the psw sfr contains several bits that reflect the current status of the cpu as listed in table 5. sfr address: d0h power-on default: 00h bit addressable: yes table 5. psw sfr bit designations bit no. name description 7 cy carry flag. 6 ac auxiliary carry flag. 5 f0 general-purpose flag. 4, 3 rs1, rs0 register bank select bits. rs1 rs0 selected bank 0 0 0 0 1 1 1 0 2 1 1 3 2 ov overflow flag. 1 f1 general-purpose flag. 0 p parity bit.
ADUC845/aduc847/aduc848 rev. a | page 25 of 108 power control register (pcon) the pcon sfr contains bits for power-saving options and general-purpose status flags as listed in table 6. sfr address: 87h power-on default: 00h bit addressable: no table 6. pcon sfr bit designations bit no. name description 7 smod double uart baud rate. 0 = normal, 1 = double baud rate. 6 seripd serial power-down inte rrupt enable. if this bit is set, a serial interrupt from either spi or i 2 c can terminate the power-down mode. 5 int0pd int0 power-down interrupt enable. if this bit is set, either a level (it0 = 0) or a negative-going transition (it0 = 1) on the int0 pin terminates power-down mode. 4 aleoff if set to 1, the ale output is disabled. 3 gf1 general-purpose flag bit. 2 gf0 general-purpose flag bit. 1 pd power-down mode enable. if set to 1, the part enters power-down mode. 0 ----- not implemented. write dont care. ADUC845/aduc847/aduc848 configuration register (cfg845/cfg847/cfg848) the cfg845/cfg847/cfg848 sfr contains the bits necessary to configure the internal xram and the extended sp. by default, it configures the user into 8051 mode, that is, extended sp, and the internal xram are disabled. when using in a program, use the part name only, that is, cfg845, cfg847, or cfg848. sfr address: afh power-on default: 00h bit addressable: no table 7. cfg845/cfg847/cfg848 sfr bit designations bit no. name description 7 exsp extended sp enable. if this bit is set to 1, the stack rolls over from sph/sp = 00ffh to 0100h. if this bit is cleared to 0, sph sfr is disabled and the stack rolls over from sp = ffh to sp = 00h. 6 ---- not implemented. write dont care., 5 ---- not implemented. write dont care. 4 ---- not implemented. write dont care. 3 ---- not implemented. write dont care. 2 ---- not implemented. write dont care. 1 ---- not implemented. write dont care. 0 xramen if this bit is set to 1, the internal xram is mapped into the lower 2 kbytes of the external address space. if this bit is cleared to 0, the internal xram is accessible and up to 16 mb of external data memory become available. see figure 8.
ADUC845/aduc847/aduc848 rev. a | page 26 of 108 adc circuit information the ADUC845 incorporates two 10-channel (8-channel on the mqfp package) 24-bit -? adcs, while the aduc847 and aduc848 each incorporate a single 10-channel (8-channel on the mqfp package) 24-bit and 16-bit -? adc. each part also includes an on-chip programmable gain amplifier and configurable buffering (neither is available on the auxiliary adc on the ADUC845). the parts also incorporate digital filtering intended for measuring wide dynamic range and low frequency signals such as those in weigh-scale, strain-gage, pressure transducer, or temperature measurement applications. the ADUC845/aduc847/ad uc848 can be configured as four or five (mqfp/lfcsp package) fully-differential input channels or as eight or ten (mqfp/lfcsp package) pseudo differential input channels referenced to aincom. the adc on each part (primary only on the ADUC845) can be fully buffered internally, and can be programmed for one of eight input ranges from 20 mv to 2.56 v (v ref 1.024). buffering the input channel means that the part can handle significant source impedances on the selected analog input and that rc filtering (for noise rejection or rfi reduction) can be placed on the analog inputs. it should be noted that if the adc is used with internal buffering disabled (adc0con1.7 = 1, adc0con1.6 = 0), these un- buffered inputs provide a dynamic load to the driving source. therefore, resistor/capacitor combinations on the inputs can cause dc gain errors, depending on the output impedance of the source that is driving the adc inputs. table 8 and table 9 show the allowable external resistance/ capacitance values for unbuffered mode such that no gain error at the 16-bit and 20-bit levels, respectively, is introduced. when used with internal buffering enabled, it is recommended that a capacitor (10 nf to 100 nf) be placed on the input to the adc (usually as part of an antialiasing filter) to aid in noise performance. the input channels are intended to convert signals directly from sensors without the need for external signal conditioning. with internal buffering disabled (relevant bits set/cleared in adc0con1), external buffering might be required. when the internal buffer is enabled, it might be necessary to offset the negative input channel by +100 mv and to offset the positive channel by ?100 mv if the reference range is av dd . this accounts for the restricted common-mode input range in the buffer. some circuits, for example, bridge circuits, are inherently suitable to use without having to offset where the output voltage is balanced around v ref /2 and is not sufficiently large to encroach on the supply rails. internal buffering is not available on the auxiliary adc (ADUC845 only). the auxiliary adc (ADUC845 only) is fixed at a gain range of 2.50 v. the adcs use a - conversion technique to realize up to 24 bits on the ADUC845 and the aduc847 and up to 16 bits on the aduc848 of no missing codes performance (20 hz update rate, chop enabled). the - modulator converts the sampled input signal into a digital pulse train whose duty cycle contains the digital information. a sinc 3 programmable low-pass filter (see table 28) is then used to decimate the modulator output data stream to give a valid data conversion result at program- mable output rates. the signal chain has two modes of operation, chop enabled and chop disabled. the chop bit in the adcmode register enables or disables the chopping scheme. table 8. maximum resistance for no 16-bit gain error (unbuffered mode) external capacitance gain 0 pf 50 pf 100 pf 500 pf 1000 pf 5000 pf 1 111.3 k? 27.8 k? 16.7 k? 4.5 k? 2.58 k? 700 ? 2 53.7 k? 13.5 k? 8.1 k? 2.2 k? 1.26 k? 360 ? 4 25.4 k? 6.4 k? 3.9 k? 1.0 k? 600 ? 170 ? 8C128 10.7 k? 2.9 k? 1.7 k? 480 ? 270 ? 75 ? table 9. maximum resistance for no 20-bit gain error (unbuffered mode) external capacitance gain 0 pf 50 pf 100 pf 500 pf 1000 pf 5000 pf 1 84.9 k? 21.1 k? 12.5 k? 3.2 k? 1.77 k? 440 ? 2 42.0 k? 10.4 k? 6.1 k? 1.6 k? 880 ? 220 ? 4 20.5 k? 5.0 k? 2.9 k? 790 ? 430 ? 110 ? 8C128 8.8 k? 2.3 k ? 1.3 k ? 370 ? 195 ? 50 ?
ADUC845/aduc847/aduc848 rev. a | page 27 of 108 signal chain overview (chop enabled, chop = 0) with the chop bit = 0 (see the adcmode sfr bit designa- tions in table 24), the chopping scheme is enabled. this is the default condition and gives optimum performance in terms of offset errors and drift performance. with chop enabled, the available output rates vary from 5.35 hz to 105 hz (sf = 255 and 13, respectively). a typical block diagram of the adc input channel with chop enabled is shown in figure 12. the sampling frequency of the modulator loop is many times higher than the bandwidth of the input signal. the integrator in the modulator shapes the quantization noise (which results from the analog-to-digital conversion) so that the noise is pushed toward one-half of the modulator frequency. the output of the - modulator feeds directly into the digital filter. the digital filter then band-limits the response to a frequency significantly lower than one-half of the modulator frequency. in this manner, the 1-bit output of the comparator is translated into a band limited, low noise output from the adcs. the adc filter is a low-pass sinc 3 or (sinx/x) 3 filter whose primary function is to remove the quantization noise introduced at the modulator. the cutoff frequency and decimated output data rate of the filter are programmable via the sinc filter word loaded into the filter (sf) register (see table 28). the complete signal chain is chopped, resulting in excellent dc offset and offset drift specifications and is extremely beneficial in applica- tions where drift, noise rejection, and optimum emi rejection are important. with chop enabled, the adc repeatedly reverses its inputs. the decimated digital output words from the sinc 3 filter, therefore, have a positive offset and a negative offset term included. as a result, a final summing stage is included so that each output word from the filter is summed and averaged with the previous filter output to produce a new valid output result to be written to the adc data register. programming the sinc 3 decimation factor is restricted to an 8-bit register called sf (see table 28), the actual decimation factor is the register value times 8. therefore, the decimated output rate from the sinc 3 filter (and the adc conversion rate) is mod adc f sf f = 8 1 3 1 where: f adc is the adc conversion rate. sf is the decimal equivalent of the word loaded to the filter register. f mod is the modulator sampling rate of 32.768 khz. the chop rate of the channel is half the output data rate: adc chop f f = 2 1 as shown in the block diagram (figure 12), the sinc 3 filter outputs alternately contain +v os and ?v os , where v os is the respective channel offset. sinc 3 filter pga 3 (8 sf) - ? mod f adc digital output a nalo g input mux buf ain + v os ain ? v os f mod xor 2 f chop f chop f in 04741-0-013 - ? figure 12. block diagram of the adc input channel with chop enabled
ADUC845/aduc847/aduc848 rev. a | page 28 of 108 this offset is removed by performing a running average of 2. this average by 2 means that the settling time to any change in programming of the adc is twice the normal conversion time, while an asynchronous step change on the analog input is not fully reflected until the third subsequent output. see figure 13. adc adc settle t f t = = 2 2 the allowable range for sf (chop enabled) is 13 to 255 with a default of 69 (45h). the corresponding conversion rates, rms and peak-to-peak noise performances are shown in table 10, table 11, table 12, and table 13. the numbers are typical and generated at a differential input voltage of 0 v and a common-mode voltage of 2.5 v. note that the con- version time increases by 0.732 ms for each increment in sf. sample 1 no/invalid output sample 2 sample 3 sample 4 sample 5 sample 6 sample 1 + sample 2 valid output 2 sample 5 + sample 6 valid output 2 sample 2 + sample 3 valid output 2 synchronous change (i.e. channel change) sample 4 + sample 5 valid output 2 sample 3 + sample 4 no output 2 04741-0-012 figure 13. adc settling time following a synchronous change with chop enabled sample 1 no output sample 2 sample 3 sample 4 sample 5 sample 6 sample 1 + sample 2 valid output 2 sample 5 + sample 6 valid output 2 sample 2 + sample 3 valid output 2 asynchronous change (i.e. discontinuous input change) sample 4 + sample 5 unsettled output 2 sample 3 + sample 4 unsettled output 2 04741-0-014 figure 14. adc settling time following an asynchronous change with chop enabled
ADUC845/aduc847/aduc848 rev. a | page 29 of 108 adc noise performance with chop enabled ( chop = 0) table 10, table 11, table 12, and table 13 show the output rms noise and output peak-to-peak resolution in bits (rounded to the nearest 0.5 lsb) for some typical output update rates for the ADUC845, aduc847, and aduc848. the numbers are typical and are generated at a differential input voltage of 0 v and a common-mode voltage of 2.5 v. the output update rate is selected via the sf7 to sf0 bits in the sf filter register. it is important to note that the peak-to-peak resolution figures represent the resolution for which there is no code flicker within a 6-sigma limit. the output noise comes from two sources. the first source is the electrical noise in the semiconductor devices (device noise) used in the implementation of the modulator. the second source is quantization noise, which is added when the analog input is converted to the digital domain. the device noise is at a low level and is independent of frequency. the quantization noise starts at an even lower level but rises rapidly with increasing frequency to become the dominant noise source. the numbers in the tables are given for the bipolar input ranges. for the unipolar ranges, the rms noise numbers are in the same range as the bipolar figures, but the peak-to-peak resolution is based on half the signal range, which effectively means losing 1 bit of resolution. table 10. ADUC845 and aduc847 typical output rms noise (v) vs. input range and update rate with chop enabled input range sf word data update rate (hz) 20 mv 40 mv 80 mv 160 mv 320 mv 640 mv 1.28 v 2.56 v 13 105.03 1.75 1.30 1.65 1.5 2.1 3.1 7.15 13.3 23 59.36 1.25 0.95 1.08 0.94 1.0 1.87 3.24 7.1 27 50.56 1.0 1.0 0.85 0.85 1.13 1.56 2.9 3.6 69 19.79 0.63 0.68 0.52 0.7 0.61 1.1 1.3 2.75 255 5.35 0.31 0.38 0.34 0.32 0.4 0.45 0.68 1.22 table 11. ADUC845 and aduc847 typical peak-to-peak resolution (b its) vs. input range and update rate with chop enabled input range sf word data update rate (hz) 20 mv 40 mv 80 mv 160 mv 320 mv 640 mv 1.28 v 2.56 v 13 105.03 12 13 14 15 15.5 16 16 16 23 59.36 12 13.5 14.5 15.5 16.5 16.5 17 16.5 27 50.56 12.5 13.5 15 16 16.5 17 17 17.5 69 19.79 13 14 15.5 16 17.5 17.5 18 18 255 5.35 14.5 15 16 17 18 18.5 19 19.5 table 12. aduc848 typical output noise (v) vs. input range and update rate with chop enabled input range sf word data update rate (hz) 20 mv 40 mv 80 mv 160 mv 320 mv 640 mv 1.28 v 2.56 v 13 105.03 1.75 1.30 1.65 1.5 2.1 3.1 7.15 13.3 23 59.36 1.25 0.95 1.08 0.94 1.0 1.87 3.24 7.1 27 50.56 1.0 1.0 0.85 0.85 1.13 1.56 2.9 3.6 69 19.79 0.63 0.68 0.52 0.7 0.61 1.1 1.3 2.75 255 5.35 0.31 0.38 0.34 0.32 0.4 0.45 0.68 1.22 table 13. aduc848 typical peak-to-peak resolution (bits) vs. input range and update rate with chop enabled input range sf word data update rate (hz) 20 mv 40 mv 80 mv 160 mv 320 mv 640 mv 1.28 v 2.56 v 13 105.03 12 13 14 15 15.5 16 16 16 23 59.36 12 13.5 14.5 15.5 16 16 17 16 27 50.56 12.5 13.5 15 16 16 16 16 16 69 19.79 13 14 15.5 16 16 16 16 16 255 5.35 14.5 15 16 16 16 16 16 16
ADUC845/aduc847/aduc848 rev. a | page 30 of 108 signal chain overview with chop disabled ( chop = 1) with chop = 1, chop is disabled and the available output rates vary from 16.06 hz to 1.365 khz. the range of applicable sf words is from 3 to 255. when switching between channels with chop disabled, the channel throughput rate is higher than when chop is enabled. the drawback with chop disabled is that the drift performance is degraded and offset calibration is required following a gain range change or significant temperature change. a block diagram of the adc input channel with chop disabled is shown in figure 15. the signal chain includes a multiplex or buffer, pga, - modulator, and digital filter. the modulator bit stream is applied to a sinc 3 filter. programming the sinc 3 decimation factor is restricted to an 8-bit register sf; the actual decimation factor is the register value times 8. the decimated output rate from the sinc 3 filter (and the adc conversion rate) is therefore mod adc f sf f = 8 1 where: f adc is the adc conversion rate. sf is the decimal equivalent of the word loaded to the filter register, valid range is from 3 to 255. f mod is the modulator sampling rate of 32.768 khz. the settling time to a step input is governed by the digital filter. a synchronized step change requires a settling time of three times the programmed update rate; a channel change can be treated as a synchronized step change. this is one conversion longer than the case for chop enabled. however, because the adc throughput is three times faster with chop disabled than it is with chop enabled, the actual time to a settled adc output is significantly less also. this means that following a synchronized step change, the adc requires three conversions (note: data is not output following a synchronized adc change until data has settled) before the result accurately reflects the new input voltage. adc adc settle t f t = = 3 3 an unsynchronized step change requires four conversions to accurately reflect the new analog input at its output. note that with an unsynchronized change the adc continues to output data and so the user must take unsettled outputs into account. again, this is one conversion longer than with chop enabled, but because the adc throughput with chop disabled is faster than with chop enabled, the actual time taken to obtain a settled adc output is less. the allowable range for sf is 3 to 255 with a default of 69 (45h). the corresponding conversion rates, rms, and peak-to-peak noise performances are shown in table 14, table 15, table 16, and table 17. note that the conversion time increases by 0.244 ms for each increment in sf. sinc 3 filter pga 8 sf - ? mod f adc digital output analog input mux buf f mod f in 04741-0-015 figure 15. block diagram of adc input channel with chop disabled
ADUC845/aduc847/aduc848 rev. a | page 31 of 108 adc noise performance with chop disabled ( chop = 1) table 14, table 15, table 16, and table 17 show the output rms noise and output peak-to-peak resolution in bits (rounded to the nearest 0.5 lsb) for some typical output update rates. the numbers are typical and are generated at a differential input voltage of 0 v and a common-mode voltage of 2.5 v. the output update rate is selected via the sf7 to sf0 bits in the sf filter register. note that the peak-to-peak resolution figures represent the resolution for which there is no code flicker within a 6- sigma limit. the output noise comes from two sources. the first source is the electrical noise in the semiconductor devices (device noise) used in the implementation of the modulator. the second source is quantization noise, which is added when the analog input is converted to the digital domain. the device noise is at a low level and is independent of frequency. the quantization noise starts at an even lower level but rises rapidly with increasing frequency to become the dominant noise source. the numbers in the tables are given for the bipolar input ranges. for the unipolar ranges, the rms noise numbers are the same as the bipolar range, but the peak-to-peak resolution is based on half the signal range, which effectively means losing 1 bit of resolution. typically, the performance of the adc with chop disabled shows a 0.5 lsb degradation over the performance with chop enabled. table 14. ADUC845 and aduc847 typical output rms noise (v) vs. input range and update rate with chop disabled table 15. ADUC845 and aduc847 typical peak-to-peak resolution (b its) vs. input range and update rate with chop disabled table 16. aduc848 typical output rms noise (v) vs. input range and update rate with chop disabled table 17. aduc848 typical peak-to-peak resolution (bits) vs. input range and update rate with chop disabled input range sf word data update rate (hz) 20 mv 40 mv 80 mv 160 mv 320mv 640mv 1.28 v 2.56 v 3 1365.33 7.5 9 9 9 9 9 9 9 13 315.08 11.5 12.5 13.5 14 13.5 14 14 14 68 59.36 13 14 14.5 15.5 16 16 16 16 82 49.95 13 14 15 16 16 16 16 16 255 16.06 13.5 14.5 15.5 16 16 16 16 16 input range sf word data update rate (hz) 20 mv 40 mv 80 mv 160 mv 320 mv 640 mv 1.28 v 2.56 v 3 1365.33 30.64 24.5 56.18 100.47 248.39 468.65 774.36 1739.5 13 315.08 2.07 1.95 2.28 3.24 8.22 13.9 20.98 49.26 68 59.36 0.85 0.79 1.01 0.99 0.79 1.29 2.3 3.7 82 49.95 0.83 0.77 0.85 0.77 0.91 1.12 1.59 3.2 255 16.06 0.52 0.58 0.59 0.48 0.52 0.57 1.16 1.68 input range sf word data update rate (hz) 20 mv 40 mv 80 mv 160 mv 320 mv 640 mv 1.28 v 2.56 v 3 1365.33 7.5 9 9 9 9 9 9 9 13 315.08 11.5 12.5 13.5 14 13.5 14 14 14 68 59.36 13 14 14.5 15.5 17 17 17.5 18 82 49.95 13 14 15 16 16.5 17.5 18 18 255 16.06 13.5 14.5 15.5 16.5 17.5 18.5 18.5 19 input range sf word data update rate (hz) 20 mv 40 mv 80 mv 160 mv 320 mv 640 mv 1.28 v 2.56 v 3 1365.33 30.64 24.5 56.18 100.47 248.39 468.65 774.36 1739.5 13 315.08 2.07 1.95 2.28 3.24 8.22 13.9 20.98 49.26 69 59.36 0.85 0.79 1.01 0.99 0.79 1.29 2.3 3.7 82 49.95 0.83 0.77 0.85 0.77 0.91 1.12 1.59 3.2 255 16.06 0.52 0.58 0.59 0.48 0.52 0.57 1.16 1.68
ADUC845/aduc847/aduc848 rev. a | page 32 of 108 auxiliary adc (ADUC845 only) table 18. ADUC845 typical output rms noise (v) vs. update rate with chop enabled sf word data update rate (hz) v 13 105.03 17.46 23 59.36 3.13 27 50.56 4.56 69 19.79 2.66 255 5.35 1.13 table 19. ADUC845 typical peak-to-peak resolution (bits) vs. update rate 1 with chop enabled sf word data update rate (hz) bits 13 105.03 15.5 23 59.36 18 27 50.56 17.5 69 19.79 18 255 5.35 19.5 1 adc converting in bipolar mode. table 20. ADUC845 typical output rms noise (v) vs. update rate with chop disabled sf word data update rate (hz) v 3 1365.33 1386.58 13 315.08 34.94 66 62.06 3.2 69 59.36 3.19 81 50.57 3.14 255 16.06 1.71 table 21. ADUC845 peak-to-peak resolution (bits) vs. update rate with chop disabled sf word data update rate (hz) bits 3 1365.33 9 13 315.08 14.5 66 62.06 18 69 59.36 18 81 50.57 18 255 16.06 19 reference inputs the ADUC845/aduc847/aduc848 each have two separate differential reference inputs, refin and refin2. while both references are available for use with the primary adc, only refin is available for the auxiliary adc (ADUC845 only). the common-mode range for these differential references is from agnd to av dd . the nominal external reference voltage is 2.5 v, with the primary and auxiliary (ADUC845 only) reference select bits configured from the adc0con2 and adc1con (ADUC845 only), respectively. when an external reference voltage is used, the primary adc sees this internally as a 2.56 v reference (v ref 1.024). therefore, any calculations of lsb size should account for this. for instance, with a 2.5 v external reference connected and using a gain of 1 on a unipolar range (2.56 v), the lsb size is (2.56/2 24 ) = 152.6 nv (if using the 24-bit adc on the ADUC845 or aduc847). if a bipolar gain of 4 is used (640 mv), the lsb size is (640 mv)/2 24 ) = 76.3 nv (again using the 24-bit adc on the ADUC845 or aduc847). the ADUC845/aduc847/ad uc848 can also be configured to use the on-chip band gap reference via the xref0/1 bits in the adc0con2 sfr (for primary adc) or the axref bit in adc1con (for auxiliary adc (ADUC845 only)). in this mode of operation, the adc sees the internal reference of 1.25 v, thereby halving all the input ranges. a consequence of using the internal band gap reference is a noticeable degradation in peak- to-peak resolution. for this reason, operation with an external reference is recommended. in applications where the excitation (voltage or current) for the transducer on the analog input also drives the reference inputs for the part, the effect of any low frequency noise in the excitation source is removed because the application is ratio- metric. if the parts are not used in a ratiometric configuration, a low noise reference should be used. recommended reference voltage sources for the ADUC845/aduc847/aduc848 include adr421, ref43, and ref192. the reference inputs provide a high impedance, dynamic load to external connections. because the impedance of each reference input is dynamic, resistor/capacitor combinations on these pins can cause dc gain errors, depending on the output impedance of the source that is driving the reference inputs. reference voltage sources, such as those mentioned above, for example, the adr421, typically have low output impedances, and, therefore, decoupling capacitors on the refin or refin2 inputs would be recom- mended (typically 0.1 f). deriving the reference voltage from an external resistor configuration means that the reference input sees a significant external source impedance. external decoupling of the refin and/or refin2 inputs is not recommended in this type of configuration. burnout current sources the primary adc on the ADUC845 and the adc on the aduc847 and aduc848 incorporate two 200 a constant current generators, one sourcing current from the av dd to ain(+), and one sinking current from ain( ? ) to agnd. these currents are only configurable for use on ain4 to ain5 and/or ain6 to ain7 in differential mode only, from the icon.6 bit in the icon sfr (see table 30). these burnout current sources are also available only with buffering enabled via the buf0/buf1 bits in the adc0con1 sfr. once the burnout currents are turned on, a current flows in the external transducer circuit, and a measurement of the input voltage on the analog input channel
ADUC845/aduc847/aduc848 rev. a | page 33 of 108 can be taken. when the resulting voltage measured is full scale, the transducer has gone open circuit. when the voltage measured is 0 v, this indicates that the transducer has gone short circuit. the current sources work over the normal absolute input voltage range specifications. reference detect circuit the main and auxiliary (ADUC845 only) adcs can be configured to allow the use of the internal band gap reference or an external reference that is applied to the refin pins by means of the xref0/1 bit in the control registers ad0con2 and ad1con (ADUC845 only). a reference detection circuit is provided to detect whether a valid voltage is applied to the refin pins. this feature arose in connection with strain-gage sensors in weigh scales where the reference and signal are provided via a cable from the remote sensor. it is desirable to detect whether the cable is disconnected. if either of the pins is floating or if the applied voltage is below a specified threshold, a flag (noxref) is set in the adc status register (adcstat), conversion results are clamped, and calibration registers are not updated if a calibration is in progress. note that the reference detect does not look at refin2 pins. if, during either an offset or gain calibration, the noexref bit becomes active, indicating a incorrect v ref , updating the relevant calibration register is inhibited to avoid loading incorrect data into these registers, and the appropriate bits in adcstat (err0 or err1) are set. if the user needs to verify that a valid reference is in place every time a calibration is performed, the status of the err0 and err1 bits should be checked at the end of every calibration cycle. sinc filter register (sf) the number entered into the sf register sets the decimation factor of the sinc 3 filter for the adc. see table 28 and table 29. the range of operation of the sf word depends on whether adc chop is on or off. with chop disabled, the minimum sf word is 3 and the maximum is 255. this gives an adc through- put rate from 16.06 hz to 1.365 khz. with chop enabled, the minimum sf word is 13 (all values lower than 13 are clamped to 13) and the maximum is 255. this gives an adc throughput rate of from 5.4 hz to 105 hz. see the f adc equation in the adc description preceding section. an additional feature of the sinc 3 filter is a second notch filter positioned in the frequency response at 60 hz. this gives simultaneous 60 hz rejection to whatever notch is defined by the sf filter. this 60 hz filter is enabled via the rej60 bit in the adcmode register (adcmode.6). the notch is valid only for sf words 68; otherwise, adc errors occur, and, in fact, the notch is best used with an sf word of 82d giving simultaneous 50 hz and 60 hz rejection. this function is useful only with an adc clock (modulator rate) of 32.768 khz. during calibration, the current (user-written) value of the sf register is used. - ? modulator a -? adc usually consists of two main blocks, an analog modulator, and a digital filter. for the ADUC845/aduc847/ aduc848, the analog modulator consists of a difference amplifier, an integrator block, a comparator, and a feedback dac as shown in figure 16. integrator comparator difference amp a nalo g input high frequency bit stream to digital filter dac 04741-0-016 figure 16. -? modulor simplified block diagram in operation, the analog signal is fed to the difference amplifier along with the output from the feedback dac. the difference between these two signals is integrated and fed to the comparator. the output from the comparator provides the input to the feed- back dac so the system functions as a negative feedback loop that tries to minimize the difference signal. the digital data that represents the analog input voltage is contained in the duty cycle of the pulse train appearing at the output of the comparator. this duty cycle data can be recovered as a data-word by using a subsequent digital filter stage. the sampling frequency of the modulator loop is many times higher than the bandwidth of the input signal. the integrator in the modulator shapes the quantization noise (that results from the analog-to-digital conversion) so that the noise is pushed toward one-half of the modulator frequency. digital filter the output of the -? modulator feeds directly into the digital filter. the digital filter then band-limits the response to a frequency significantly lower than one-half of the modulator frequency. in this manner, the 1-bit output of the comparator is translated into a band-limited, low noise output from the part. the ADUC845/aduc847/ad uc848 filter is a low-pass, sinc 3 or [(sinx)/x] 3 filter whose primary function is to remove the quantization noise introduced at the modulator. the cutoff frequency and decimated output data rate of the filter are programmable via the sf (sinc filter) sfr as listed in table 28 and table 29. figure 22, figure 23, figure 24, and figure 25 show the frequency response of the adc, yielding an overall output rate of 16.6 hz with chop enabled and 50 hz with chop disabled. also detailed in these plots is the effect of the fixed 60 hz drop-in notch filter (rej60 bit, adcmode.6). this fixed filter can be enabled or disabled by setting or clearing the rej60 bit in the adcmode register (adcmode.6). this 60 hz drop-in notch filter can be
ADUC845/aduc847/aduc848 rev. a | page 34 of 108 enabled for any sf word that yields an adc throughput that is less than 20 hz with chop enabled (sf 68 decimal). adc chopping the adcs on the ADUC845/aduc847/aduc848 implement a chopping scheme whereby the adc repeatedly reverses its inputs. the decimated digital output words from the sinc 3 filter, there- fore, have a positive and negative offset term included. as a result, a final summing stage is included in each adc so that each output word from the filter is summed and averaged with the previous filter output to produce a new valid output result to be written to the adc data sfrs. the adc throughput or update rate is listed in table 29. the chopping scheme incor- porated into the parts results in excellent dc offset and offset drift specifications and is extremely beneficial in applications where drift, noise rejection, and optimum emi performance are important. adc chop can be disabled via the chop bit in the adcmode sfr (adcmode.3). setting this bit to 1 (logic high) disables chop mode. calibration the ADUC845/aduc847/aduc848 incorporate four calibration modes that can be programmed via the mode bits in the adcmode sfr detailed in table 24. every part is calibrated before it leaves the factory. the resulting offset and gain calibration coefficients for both the primary and auxiliary (ADUC845 only) adcs are stored on-chip in manufacturing- specific flash/ee memory locations. at power-on or after a reset, these factory calibration registers are automatically downloaded to the adc calibration registers in the parts sfr space. to facilitate user calibration, each of the primary and auxiliary (ADUC845 only) adcs have dedicate d calibration control sfrs, which are described in the adc sfr interface section. once a user initiates a calibration procedure the factory calibration values that were initially downloaded during the power-on sequence to the adc calibration sfrs are overwritten. the adc to be calibrated must be enabled via the adc enable bits in the adcmode register. even though an internal offset calibration mode is described in this section, note that the adcs can be chopped. this chopping scheme inherently minimizes offset errors and means that an offset calibration should never be required. also, because factory 5 v/25c gain calibration coefficients are automatically present at power-on, an internal full-scale calibration is required only if the part is operated at 3 v or at temperatures significantly different from 25c. if the part is operated in chop disabled mode, a calibration may need to be done with every gain range change that occurs via the pga. the ADUC845/aduc847/aduc848 ea ch offer internal or system calibration facilities. for full calibration to occur on the selected adc, the calibration logic must record the modulator output for two input conditions: zero-scale and full-scale points. these points are derived by performing a conversion on the different input voltages (zero-scale and full-scale) provided to the input of the modulator during calibration. the result of the zero-scale calibration conversion is stored in the offset calibration registers for the appropriate adc. the result of the full-scale calibration conversion is stored in the gain calibration registers for the appropriate adc. with these readings, the calibration logic can calculate the offset and the gain slope for the input-to-output transfer function of the converter. during an internal zero-scale or full-scale calibration, the respective zero-scale input or full-scale input is automatically connected to the adc inputs internally. a system calibration, however, expects the system zero-scale and system full-scale voltages to be applied externally to the adc pins by the user before the calibration mode is initiated. in this way, external errors are taken into account and minimized. note that all ADUC845/aduc847/aduc848 adc ca librations are carried out at the user-selected sf word update rate. to optimize calibration accuracy, it is recommended that the slowest possible update rate be used. internally in the parts, the coefficients are normalized before being used to scale the words coming out of the digital filter. the offset calibration coefficient is subtracted from the result prior to the multiplication by the gain coefficient. from an operational point of view, a calibration should be treated just like an ordinary adc conversion. a zero-scale calibration (if required) should always be carried out before a full-scale calibration. system software should monitor the relevant adc rdy0/1 bit in the adcstat sfr to determine the end of calibration by using a polling sequence or an interrupt driven routine. if required, the noexref0/1 bits can be moni- tored to detect unconnected or low voltage errors in the reference during conversion. in the event of the reference becoming disconnected, causing a noxref flag during a calibration, the calibration is immediately halted and no write to the calibration sfrs takes place. internal calibration example with chop enabled, a zero-scale or offset calibration should never be required, although a full-scale or offset calibration may be required. however, if a full internal calibration is required, the procedure should be to select a pga gain of 1 (2.56 v) and perform a zero-scale calibration (md2...0 = 100b in the adcmode register). next, select and perform full-scale calibration by setting md2...0 = 101b in the adcmode sfr. now select the desired pga range and perform a zero-scale calibration again (md2..0 = 100b in adcmode) at the new pga range. the reason for the double zero-scale calibration is that the internal calibration procedure for full-scale calibration automatically selects the reference in voltage at pga = 1. therefore, the full-scale endpoint calibration automatically
ADUC845/aduc847/aduc848 rev. a | page 35 of 108 subtracts the offset calibration error, it is advisable to perform an offset calibration at the same gain range as that used for full- scale calibration. there is no penalty to the full-scale calibration in redoing the zero-scale calibration at the required pga range because the full-scale calibration has very good matching at all the pga ranges. this procedure also applies when chop is disabled. note that for internal calibration to be effective, the ain ? pin should be held at a steady voltage, within the allowable common- mode range to keep it from floating during calibration. system calibration example with chop enabled, a system zero-scale or offset calibration should never be required. however, if a full-scale or gain calibration is required for any reason, use the following typical procedure for doing so. 1. apply a differential voltage of 0 v to the selected analog inputs (ain+ to ain?) that are held at a common-mode voltage. perform a system zero-scale or offset calibration by setting the md2...0 bits in the adcmode register to 110b. 2. apply a full-scale differential voltage across the adc inputs again at the same common-mode voltage. perform a system full-scale or gain calibration by setting the md2...0 bits in the adcmode register to 111b. perform a system calibration at the required pga range to be used since the adc scales to the differential voltages that are applied to the adc during the calibration routines. in bipolar mode, the zero-scale calibration determines the mid- scale point of the adc (800000h) or 0 v. programmable gain amplifier the primary adc incorporates an on-chip programmable gain amplifier (pga). the pga can be programmed through eight different ranges, which are programmed via the range bits (rn0 to rn2) in the adc0con1 register. with an external 2.5 v reference applied, the unipolar ranges are 0 mv to 20 mv, 0 mv to 40 mv, 0 mv to 80 mv, 0 mv to 160 mv, 0 mv to 320 mv, 0 mv to 640 mv, 0 v to 1.28 v and 0 v to 2.56 v, while in bipolar mode the ranges are 20 mv, 40 mv, 80 mv, 160 mv, 320 mv, 64 0 mv, 1.28 v, and 2.56 v. these ranges should appear on the input to the on-chip pga. the adc range- matching specification of 2 v (typical with chop enabled) means that calibration need only be carried out on a single range and need not be repeated when the adc range is changed. this is a significant advantage compared to similar mixed-signal solutions available on the market. the auxiliary (ADUC845 only) adc does not incorporate a pga, and the gain is fixed at 0 v to 2.50 v in unipolar mode, and 2.50 v in bipolar mode. bipolar/unipolar configuration the analog inputs of the ADUC845/aduc847/aduc848 can accept either unipolar or bipolar input voltage ranges. bipolar input ranges do not imply that the part can handle negative voltages with respect to system agnd, but rather with respect to the negative reference input. unipolar and bipolar signals on the ain(+) input on the adc are referenced to the voltage on the respective ain(?) input. ain(+) and ain(?) refer to the signals seen by the adc. for example, if ain(?) is biased to 2.5 v (tied to the external reference voltage) and the adc is configured for a unipolar analog input range of 0 mv to > 20 mv, the input voltage range on ain(+) is 2.5 v to 2.52 v. on the other hand, if ain( ?) is biased to 2.5 v (again the external reference voltage) and the adc is configured for a bipolar analog input range of 1.28 v, the analog input range on the ain(+) is 1.22 v to 3.78 v, that is, 2.5 v 1.28 v. the modes of operation for the adc are fully differential mode or pseudo differential mode. in fully differential mode, ain1 to ain2 are one differential pair, ain3 to ain4 are another pair (ain5 to ain6, ain7 to ain8, and ain9 to ain10 are the others). in differential mode, all ain( ?) pin names imply the negative analog input of the selected differential pair, that is, ain2, ain4, ain6, ain8, ain10. the term ain(+) implies the positive input of the selected differential pair, that is, ain1, ain3, ain5, ain7, ain9. in pseudo differential mode, each analog input is paired with the aincom pin, which can be biased up or tied to agnd. in this mode, the ain( ?) implies aincom and ain(+) implies any one of the ten analog input channels. the configuration of the inputs (unipolar versus bipolar) is shown in figure 17. ain1 input 1 ADUC845/aduc847/aduc848 csp package ADUC845/aduc847/aduc848 csp package input 2 input 3 input 4 input 5 input 6 input 7 input 8 input 9 input 10 ain2 ain3 ain4 ain5 ain6 ain7 ain8 ain9 ain10 aincom ain1 ain2 ain3 ain4 ain5 ain6 ain7 ain8 ain9 ain10 fully differential fully differential fully differential fully differential fully differential aincom 04741-0-017 figure 17. unipolar and bipolar channel pairs
ADUC845/aduc847/aduc848 rev. a | page 36 of 108 data output coding when the primary adc is configured for unipolar operation, the output coding is natural (straight) binary with a zero differ- ential input voltage resulting in a code of 000...000, a midscale voltage resulting in a code of 100...000, and a full-scale voltage resulting in a code of 111...111. the output code for any analog input voltage on the main adc can be represented as follows: code C ( ain gain 2 n ) / (1.024 v ref ) where: ain is the analog input voltage. gain is the pga gain setting, that is, 1 on the 2.56 v range and 128 on the 20 mv range, and n = 24 (16 on the aduc848). the output code for any analog input voltage on the auxiliary adc can be represented as follows: code = ( ain 2 n ) / ( v ref ) with the same definitions as used for the primary adc above. when the primary adc is configured for bipolar operation, the coding is offset binary with negative full-scale voltage resulting in a code of 000...000, a zero differential voltage resulting in a code of 800000, and a positive full-scale voltage resulting in a code of 111...111. the output from the primary adc for any analog input voltage can be represented as follows: code = 2 n ?1 [( ain gain ) / (1.024 v ref ) + 1] where: ain is the analog input voltage. gain is the pga gain, that is, 1 on the 2.56 v range and 128 on the 20 mv range. n = 24 (16 on the aduc848). the output from the auxiliary adc in bipolar mode can be represented as follows: code = 2 n ?1 [( ain / v ref ) + 1] excitation currents the ADUC845/aduc847/ aduc848 contain two matched, software-configurable 200 a current sources. both source current from av dd , which is directed to either or both of the iexc1 (pin 11 whose alternate functions are p1.6/ain6) or iexc2 (pin 12, whose alternate functions are p1.7/ain7) pins on the device. these currents are controlled via the lower four bits in the icon register (table 30). these bits not only enable the current sources but also allow the configuration of the currents such that 200 a can be sourced individually from both pins or can be combined to give a 400 a source from one or the other of the outputs. these sources can be used to excite external resistive bridge or rtd sensors (see figure 70). adc power-on the adc typically takes 0.5 ms to power up from an initial start-up sequence or following a power-down event.
ADUC845/aduc847/aduc848 rev. a | page 37 of 108 typical performance characteristics ?120 ?110 ?100 ?80 ?70 ?50 ?40 ?20 ?10 ?90 ?30 ?60 0 01020304050 90 80 100 70 60 110 frequency (hz) gain (db) 04741-0-018 figure 18. filter response, chop on, sf = 69 decimal ?150 ?130 ?110 ?90 ?50 ?30 ?10 ?70 01020304050 90 80 100 70 60 frequency (hz) amplitude (db) 04741-0-019 figure 19. filter response, chop on, sf = 255 decimal ?120 ?110 ?100 ?80 ?70 ?50 ?40 ?20 ?10 ?90 ?30 ?60 0 10 30 50 70 90 110 210 190 170 230 150 130 250 sf (decimal) gain (db) 04741-0-020 figure 20. 50 hz normal mode rejection vs. sf word, chop on ?120 ?110 ?100 ?80 ?70 ?50 ?40 ?20 ?10 ?90 ?30 ?60 0 10 30 50 70 90 110 210 190 170 230 150 130 250 sf (decimal) gain (db) 04741-0-021 figure 21. 60 hz normal mode rejection vs. sf, chop on ?150 ?130 ?110 ?90 ?50 ?30 ?10 ?70 10 170.1 160.1 150.1 140.1 130.1 120.1 110.1 100.1 90.1 80.1 70.1 60.1 50.1 40.1 30.1 20.1 10.1 0.1 frequency (hz) amplitude (db) 04741-0-022 figure 22. chop off, fadc = 50 hz, sf = 52h ?150 ?130 ?110 ?50 ?10 ?30 ?70 ?190 10 170.1 160.1 150.1 140.1 130.1 120.1 110.1 100.1 90.1 80.1 70.1 60.1 50.1 40.1 30.1 20.1 10.1 0.1 frequency (hz) amplitude (db) 04741-0-023 figure 23. chop off, sf = 52h, rej60 enabled
ADUC845/aduc847/aduc848 rev. a | page 38 of 108 ?120 ?100 ?80 ?40 ?20 ?60 0 100 95 90 85 75 70 80 65 60 55 50 40 45 35 30 25 20 10 15 5 0 frequency (hz) amplitude (db) 04741-0-024 figure 24. chop on, fadc = 16.6 hz, sf = 52h frequency (hz) amplitude (db) 04741-0-025 ?120 ?100 ?80 ?40 ?20 ?60 0 100 95 90 85 75 70 80 65 60 55 50 40 45 35 30 25 20 10 15 5 0 figure 25. chop on, fadc = 16.6 hz, sf = 52h, rej60 enabled
ADUC845/aduc847/aduc848 rev. a | page 39 of 108 functional description adc sfr interface the adcs are controlled and configured via a number of sfrs that are mentioned here and described in more detail in the followi ng sections. table 22. adc sfr interface name description adcstat adc status register. holds the general status of the primary and auxiliary (ADUC845 only) adcs. adcmode adc mode register. controls the general modes of operation for primary and auxiliary (ADUC845 only) adcs. adc0con1 primary adc control register 1. controls the specific configuration of the primary adc. adc0con2 primary adc control register 2. controls the specific configuration of the primary adc. adc1con auxiliary adc control register. controls the specific configuration of the auxiliary adc. ADUC845 only. sf sinc filter register. configures the decimation factor for the sinc 3 filter and, therefore, the primary and auxiliary (ADUC845 only) adc update rates. icon current source control register. allows user control of the various on-chip current source options. adc0l/m/h primary adc 24-bit (16-bit on the aduc848) conversion result is held in these three 8-bit registers. adc0l is not available on the aduc848. adc1l/m/h auxiliary adc 24-bit conversion result is held in these two 8-bit registers. ADUC845 only. of0l/m/h primary adc 24-bit offset calibration coefficient is held in these three 8-bit registers. of0l is not available on the aduc848. of1l/h auxiliary adc 16-bit offset calibration coefficient is held in these two 8-bit registers. ADUC845 only. gn0l/m/h primary adc 24-bit gain calibration coefficient is held in these three 8-bit registers. gn0l is not available on the a duc848. gn1l/h auxiliary adc 16-bit gain calibration coefficien t is held in these two 8-bit registers. ADUC845 only.
ADUC845/aduc847/aduc848 rev. a | page 40 of 108 adcstat (adc status register) this sfr reflects the status of both adcs including data ready, calibration, and various (adc-related) error and warning condit ions including refin reference detect and conversion overflow/underflow flags. sfr address: d8h power-on default: 00h bit addressable: yes table 23. ad cstat sfr bit desig nation bit no. name description 7 rdy0 ready bit for the primary adc. set by hardware on completion of conversion or calibration. cleared directly by the user or indirectly by a write to the mode bits to start calibration. the primary adc is inhibited from writing further results to its data or calibration registers until the rdy0 bit is cleared. 6 rdy1 ready bit for auxiliary (ADUC845 only) adc. same definition as rdy0 referred to the auxiliary adc. valid on the ADUC845 only. 5 cal calibration status bit. set by hardware on completion of calibration. cleared indirectly by a write to the mode bits to start another adc conversion or calibration. note that calibration with the temperature sensor selected (auxiliary adc on the ADUC845 only) fails to complete. 4 noxref no external reference bit (only active if primary or auxiliary (ADUC845 only) adc is active). set to indicate that one or both of th e refin pins is floating or the applied voltage is below a specified threshold. when set, conversion results are clamped to all 1s. on ly detects invalid refin, does not check refin2. cleared to indicate valid v ref . 3 err0 primary adc error bit. set by hardware to indicate that the result written to the primary adc data registers has been clamped to all 0s or all 1s. after a calibration, this bit also flags error conditions that caused the calibration registers not to be written. cleared by a write to the mode bits to initiate a conversion or calibration. 2 err1 auxiliary adc error bit. same definition as err0 referred to the auxiliary adc. valid on the ADUC845 only. 1 CCC not implemented. write dont care. 0 CCC not implemented. write dont care.
ADUC845/aduc847/aduc848 rev. a | page 41 of 108 adcmode (adc mode register) used to control the operational mode of both adcs. sfr address: d1h power-on default: 08h bit addressable: no table 24. adcmode sfr bit designations bit no. name description 7 CCC not implemented. write dont care. 6 rej60 automatic 60 hz notch select bit. setting this bit places a notch in the frequency resp onse at 60 hz, allowing simultaneous 50 hz and 60 hz rejection at an sf word of 82 decimal. this 60 hz notch can be set only if sf 68 decimal, that is, the regular filter notch must be 60 hz. this second notch is placed at 60 hz only if the device clock is at 32.768 khz. 5 adc0en primary adc enable. set by the user to enable the primary adc and place it in the mode selected in md2Cmd0 below. cleared by the user to place the primary adc into power-down mode. 4 adc1en (ADUC845 only) auxiliary (ADUC845 only) adc enable. set by the user to enable the auxiliary (ADUC845 only ) adc and place it in the mode selected in md2Cmd0 below. cleared by the user to place the auxiliary (ADUC845 only) adc in power-down mode. 3 chop chop mode disable. set by the user to disable chop mode on both the primary and auxiliary (ADUC845 only) adc allowing a three times higher adc data throughput. sf values as lo w as 3 are allowed with this bit set, giving up to 1.3 khz adc update rates. cleared by the user to enable chop mode on bo th the primary and auxiliary (ADUC845 only) adc. primary and auxiliary (ADUC845 only) adc mode bits. these bits select the operational mo de of the enabled adc as follows: md2 md1 md0 0 0 0 adc power-down mode (power-on default). 0 0 1 idle mode. in idle mode, the adc filter and modulator are held in a reset state although the modulator clocks are still provided. 0 1 0 single conversion mode. in single conversi on mode, a single conversion is performed on the enabled adc. upon completion of a conversion, the adc data registers (adc0h/m/l and/or adc1h/m/l (ADUC845 only )) are updated. the relevant flags in the adcstat sfr are written, and power-down is re-entered with the md2?md0 accordingly being written to 000. note that adc0l is not available on the aduc848. 0 1 1 continuous conversion. in continuous conv ersion mode, the adc data registers are regularly updated at the selected update rate (see the sinc filter sfr bit designations in table 28). 1 0 0 internal zero-scale calibration. internal short automatically connected to the enabled adc input(s). 1 0 1 internal full-scale calibration. intern al or external refin or refin2 v ref (as determined by xref bits in adc0con2 and/or axref (ADUC845 only) in adc1con (ADUC845 only) is automatically connected to the enabled adc input(s) for this calibration. 1 1 0 system zero-scale calibration. user should connect system zero-scale input to the enabled adc input(s) as selected by ch3Cch0 and ach3Cach0 bits in the adc0con2 and adc1con (ADUC845 only) registers. 2, 1, 0 md2, md1, md0 1 1 1 system full-scale calibration. user should connect system full-scale input to the enabled adc input(s) as selected by ch3Cch0 and ach3Cach0 bits in the adc0con2 and adc1con (ADUC845 only) registers.
ADUC845/aduc847/aduc848 rev. a | page 42 of 108 notes on the adcmode register ? any change to the md bits immediately resets both adcs (auxiliary adc only applicable to the ADUC845). a write to the md2Cmd0 bits with no change in contents is also treated as a reset. (see the exception to this in the third note of this section.) ? if adc0con is written when adc0en = 1, or if adc0en is changed from 0 to 1, both adcs are also immediately reset. in other words, the primary adc is given priority over the auxiliary adc and any change requested on the primary adc is immediately responded to. only applicable to the ADUC845. ? on the other hand, if adc1con is written to or if adc1en is changed from 0 to 1, only the auxiliary adc is reset. for example, if the primary adc is continuously converting when the auxiliary adc change or enable occurs, the primary adc continues undisturbed. rather than allow the auxiliary adc to operate with a phase difference from the primary adc, the auxiliary adc falls into step with the outputs of the primary adc. the result is that the first conversion time for the auxiliary adc is delayed by up to three outputs while the auxiliary adc update rate is synchronized to the primary adc. only applicable to ADUC845. if the adc1con write occurs after the primary adc has completed its operation, the auxiliary adc can respond immediately without having to fall into step with the primary adcs output cycle. ? if the parts are powered down via the pd bit in the pcon register, the current adcmode bits are preserved, that is, they are not reset to default state. upon a subsequent resumption of normal operating mode, the adcs restarts the selected operation defined by the adcmode register. ? once adcmode has been written with a calibration mode, the rdy0/1 (ADUC845 only) bits (adcstat) are reset and the calibration commences. on completion, the appropriate calibration registers are written, the relevant bits in adcstat are written, and the md2Cmd0 bits are reset to 000b to indicate that the adc is back in power- down mode. ? any calibration request of the auxiliary adc while the temperature sensor is selected fails to complete. although the rdy1 bit is set at the end of the calibration cycle, no update of the calibration sfrs takes place, and the err1 bit is set. ADUC845 only. ? calibrations performed at maximum sf (see table 28) value (slowest adc throughput rate) help to ensure optimum calibration. ? the duration of a calibration cycle is 2/fadc for chop-on mode and 4/fadc for chop-off mode.
ADUC845/aduc847/aduc848 rev. a | page 43 of 108 adc0con1 (primary adc control register) adc0con1 is used to configure the primary adc for buffer, unipolar, or bipolar coding, and adc range configuration. sfr address: d2h power-on default: 07h bit addressable: no table 25. adc0con1 sfr bit designations bit no. name description buffer configuration bits. buf1 buf0 buffer configuration 0 0 adc0+ and adc0? are buffered 0 1 reserved 1 0 buffer bypass 7, 6 buf1, buf0 1 1 reserved 5 uni primary adc unipolar bit. set by the user to enable unipolar coding; ze ro differential input results in 000000h output. cleared by the user to enable bipolar coding; zero differential input results in 800000h output. 4 CCC not implemented. write dont care. 3 CCC not implemented. write dont care. primary adc range bits. written by the user to select the primary adc input range as follows: rn2 rn1 rn0 selected primary adc input range (v ref = 2.5 v) 0 0 0 20 mv (0 mvC20 mv in unipolar mode) 0 0 1 40 mv (0 mvC40 mv in unipolar mode) 0 1 0 80 mv (0 mvC80 mv in unipolar mode) 0 1 1 160 mv (0 mvC160 mv in unipolar mode) 1 0 0 320 mv (0 mvC320 mv in unipolar mode) 1 0 1 640 mv (0 mvC640 mv in unipolar mode) 1 1 0 1.28 v (0 vC1.28 v in unipolar mode) 2, 1, 0 rn2, rn1, rn0 1 1 1 2.56 v (0 vC2.56 v in unipolar mode)
ADUC845/aduc847/aduc848 rev. a | page 44 of 108 adc0con2 (primary adc channel select register) adc0con2 is used to select a reference source and channel for the primary adc. sfr address: e6h power-on default: 00h bit addressable: no table 26. adc0con2 sfr bit designations bit no. name description primary adc external reference select bit. set by the user to enable the primary adc to use the external reference via refin or refin2. cleared by the user to enable the primary adc to use the internal band gap reference (v ref = 1.25 v). xref1 xref0 0 0 internal 1.25 v reference. 0 1 refin selected. 1 0 refin2 (ain3/ain4) selected. 7, 6 xref1, xref0 1 1 reserved. 5 CCC not implemented. write dont care. 4 CCC not implemented. write dont care. primary adc channel select bits. written by the user to select the primary adc channel as follows: ch3 ch2 ch1 ch0 selected primary adc input channel. 0 0 0 0 ain1Caincom 0 0 0 1 ain2Caincom 0 0 1 0 ain3Caincom 0 0 1 1 ain4Caincom 0 1 0 0 ain5Caincom 0 1 0 1 ain6Caincom 0 1 1 0 ain7Caincom 0 1 1 1 ain8Caincom 1 0 0 0 ain9Caincom (csp package only; not a valid selection on the mqfp package) 1 0 0 1 ain10Caincom (csp package only; not a valid selection on the mqfp package) 1 0 1 0 ain1Cain2 1 0 1 1 ain3Cain4 1 1 0 0 ain5Cain6 1 1 0 1 ain7Cain8 1 1 1 0 ain9Cain10 (csp package only; not a valid selection on the mqfp package) 3, 2, 1, 0 ch3, ch2, ch1, ch0 1 1 1 1 aincomCaincom note that because the reference-detect does not operate on the refin2 pair, the refin2 pins can go below 1 v.
ADUC845/aduc847/aduc848 rev. a | page 45 of 108 adc1con (auxiliary adc control register) (ADUC845 only) adc1con is used to configure the auxiliary adc for reference, channel selection, and unipolar or bipolar coding. the auxiliary adc is available only on the ADUC845. sfr address: d3h power-on default: 00h bit addressable: no table 27. adc1con sfr bit designations bit no. name description 7 CCC not implemented. write dont care. 6 axref auxiliary (ADUC845 only) adc external reference bit. set by the user to enable the auxiliary adc to use the external reference via refin. cleared by the user to enable the auxiliary adc to use the internal band gap reference. auxiliary adc cannot use the refin2 reference inputs. 5 auni auxiliary (ADUC845 only) adc unipolar bit. set by the user to enable unipolar coding, that is, zero input results in 000000h output. cleared by the user to enable bipolar co ding, zero input results in 800000h output. 4 CCC not implemented. write dont care. auxiliary adc channel select bits. written by the user to select the auxiliary adc channel. ach3 ach2 ach1 ach0 selected auxiliary adc input range (v ref = 2.5 v). 0 0 0 0 ain1Caincom 0 0 0 1 ain2Caincom 0 0 1 0 ain3Caincom 0 0 1 1 ain4Caincom 0 1 0 0 ain5Caincom 0 1 0 1 ain6Caincom 0 1 1 0 ain7Caincom 0 1 1 1 ain8Caincom 1 0 0 0 ain9Caincom (not a valid selection on the mqfp package) 1 0 0 1 ain10Caincom (not a valid selection on the mqfp package) 1 0 1 0 ain1Cain2 1 0 1 1 ain3Cain4 1 1 0 0 ain5Cain6 1 1 0 1 ain7Cain8 1 1 1 0 temperature sensor 1 3, 2, 1, 0 ach3, ach2, ach1, ach0 1 1 1 1 aincomCaincom 1 note the following about the temperature sensor: C when the temperature sensor is selected, user code must select the internal reference via the axref bit and clear the aun i bit (adc1con.5) to select bipolar coding. C chop mode must be enabled for correct temperature sensor operation. C the temperature sensor is factory calibrated to yield conversion results 800000h at 0c (adc chop on). C a +1c change in temperature results in a +1 lsb change in the adc1h register adc conversion result. C the temperature sensor is not available on the aduc847 or aduc848.
ADUC845/aduc847/aduc848 rev. a | page 46 of 108 sf (adc sinc filter control register) the sf register is used to configure the decimation factor for the adc, and therefore, has a direct influence on the adc throug hput rate. sfr address: d4h power-on default: 45h bit addressable: no table 28. sinc filter sfr bit designations sf.7 sf.6 sf.5 sf.4 sf.3 sf.2 sf.1 sf.0 0 1 0 0 0 1 0 1 the bits in this register set the decimation factor of the adc. this has a direct bearing on the throughput rate of the adc alo ng with the chop setting. the equations used to determine the adc throughput rate are fadc (chop on) = sfword 8 3 1 32.768 khz where sfword is in decimal. fadc (chop off ) = sfword 8 1 32.768 khz where sfword is in decimal. table 29. sf sfr bit examples chop enabled (adcmode.3 = 0) sf (decimal) sf (hexadecimal) fadc (hz) tadc (ms) tsettle (ms) 13 1 0d 105.3 9.52 19.04 69 45 19.79 50.53 101.1 82 52 16.65 60.06 120.1 255 ff 5.35 186.77 373.54 chop disabled (adcmode.3 = 1) sf (decimal) sf (hexadecimal) fadc (hz) tadc (ms) tsettle (ms) 3 03 1365.3 0.73 2.2 69 45 59.36 16.84 50.52 82 52 49.95 20.02 60.06 255 ff 16.06 62.25 186.8 1 with chop enabled, if an sf word smaller than 13 is written to this sf register, the filter automatically defaults to 13. during adc calibration, the user-programmed value of sf word is used. the sf word does not default to the maximum setting (255) as it did on previous microconverter? products. however, for optimum calibration results, it is recommended that the maximum sf word be set.
ADUC845/aduc847/aduc848 rev. a | page 47 of 108 icon (excitation current sources control register) the icon register is used to configure the current sources and the burnout detection source. sfr address: d5h power-on default: 00h bit addressable: no table 30. excitation current source sfr bit designations bit no. name description 7 CCC not implemented. write dont care. 6 icon.6 burnout current enable bit. when set, this bit enables the se nsor burnout current sources on primary adc channels ain4/ain5 or ain6/ain7. not available on any other adc inp ut pins or on the auxiliary adc (ADUC845 only). 5 icon.5 not implemented. write dont care. 4 icon.4 not implemented. write dont care. 3 icon.3 iexc2 pin select (0 = ain 8/ain1 = ain7). 2 icon.2 iexc1 pin select (0 = ain7/ain1 = ain 8). 1 icon.1 iexc2 enable bit (0 = disable). 0 icon.0 iexc1 enable bit (0 = disable). note that a write to the icon register has an immediate effect but does not reset the adcs. therefore, if a current source is c hanged while an adc is already converting, the user must wait until the third or fourth output at least (depending on the status of the chop mode) to see a fully settled new output.
ADUC845/aduc847/aduc848 rev. a | page 48 of 108 nonvolatile flash/ee memory overview the ADUC845/aduc 847/aduc848 incorporate flash/ee memory technology on-chip to provide the user with nonvolatile, in-circuit reprogrammable code and data memory space. like eeprom, flash memory can be programmed in-system at the byte level, although it must first be erased, in page blocks. thus, flash memory is often and more correctly referred to as flash/ee memory. eeprom technology eprom technology flash/ee memory technology in-circuit reprogrammable s pace efficient / density 04741-0-026 figure 26. flash/ee memory development overall, flash/ee memory represents a step closer to the ideal memory device that includes nonvolatility, in-circuit program- mability, high density, and low cost. the flash/ee memory technology incorporated allows the user to update program code space in-circuit, without needing to replace onetime programmable (otp) devices at remote operating nodes. flash/ee memory on the ADUC845, aduc847, aduc848 the ADUC845/aduc847/aduc848 provide two arrays of flash/ee memory for user applicationsup to 62 kbytes of flash/ee program space and 4 kbytes of flash/ee data memory space. also, 8-kbyte and 32-kbyte program memory options are available. all examples and references in this datasheet use the 62-kbyte option; however, similar protocols and procedures are applicable to the 32-kbyte and 8-kbyte options, provided that the difference in memory size is taken into account. the 62 kbytes flash/ee code space are provided on-chip to facilitate code execution without any external discrete rom device requirements. the program memory can be programmed in-circuit, using the serial download mode provided, using conventional third party memory programmers, or via any user-defined protocol in user download (uload) mode. the 4-kbyte flash/ee data memory space can be used as a general-purpose, nonvolatile scratchpad area. user access to this area is via a group of seven sfrs. this space can be programmed at a byte level, although it must first be erased in 4-byte pages. the following sections use the 62-kbyte program space as an example when referring to program and uload mode. for the other memory models (32-kbyte and 8-kbyte), the uload space moves to the top 6 kbytes of the on-chip program memory, that is, for the 32-kbyte memory model, the uload space is from 26 kbytes to 32 kbytes. the kernel still resides in the protected area from 60 kbytes to 62 kbytes. the uload space resides from 2 kbytes to 8 kbytes on the 8-byte part. flash/ee memory reliability the flash/ee program and data memory arrays on the ADUC845/aduc847/aduc848 are fu lly qualified for two key flash/ee memory characteristics: flash/ee memory cycling endurance and flash/ee memory data retention. endurance quantifies the ability of the flash/ee memory to be cycled through many program, read, and erase cycles. in real terms, a single endurance cycle is composed of four independent, sequential events: 1. initial page erase sequence 2. read/verify sequence 3. byte program sequence 4. second read/verify sequence in reliability qualification, every byte in both the program and data flash/ee memory is cycled from 00h to ffh until a first fail is recorded, signifying the endurance limit of the on-chip flash/ee memory. as indicated in the specification table, the ADUC845/aduc847/ aduc848 flash/ee memory endurance qualification has been carried out in accordance with jedec specification a117 over the industrial temperature range of C40c, +25c, +85c, and +125c. (the csp package is qualified to +85c only.) the results allow the specification of a minimum endurance figure over supply and temperature of 100,000 cycles, with an endurance figure of 700,000 cycles being typical of operation at 25c. retention is the ability of the flash/ee memory to retain its programmed data over time. again, the parts have been qualified in accordance with the formal jedec retention lifetime specification (a117) at a specific junction temperature (t j = 55c). as part of this qualification procedure, the flash/ee memory is cycled to its specified endurance limit described previously, before data retention is characterized. this means that the flash/ee memory is guaranteed to retain its data for its full specified retention lifetime every time the flash/ee memory is reprogrammed. it should also be noted that retention lifetime, based on an activation energy of 0.6 ev, derates with t j as shown in figure 27.
ADUC845/aduc847/aduc848 rev. a | page 49 of 108 40 60 70 90 t j junction temperature ( c) retention (years) 250 200 150 100 50 0 50 80 110 300 100 adi specification 100 years min. at t j = 55 c 04741-0-028 figure 27. flash/ee memory data retention flash/ee program memory the ADUC845/aduc847/ad uc848 contain a 64-kbyte array of flash/ee program memory. the lower 62 kbytes of this program memory are available to the user for program storage or as additional nv data memory. the upper 2 kbytes of this flash/ee program memory array contain permanently embedded firmware, allowing in-circuit serial download, serial debug, and nonintrusive single-pin emulation. these 2 kbytes of embedded firmware also contain a power-on configuration routine that downloads factory calibrated coefficients to the various calibrated peripherals such as adc, temperature sensor, current sources, band gap, and references. these 2 kbytes of embedded firmware are hidden from the user code. attempts to read this space read 0s; therefore, the embedded firmware appears as nop instructions to user code. in normal operating mode (power-on default), the 62 kbytes of user flash/ee program memory appear as a single block. this block is used to store the user code as shown in figure 28. embedded download/debug kernel permanently embedded firmware allows code to be downloaded to any of the 62 kbytes of on-chip program memory. the kernel program appears as nop instructions to user code. 62 kbytes of flash/ee program memory are available to the user. all of this space can be programmed from the permanently embedded download/debug kernel or in parallel programming mode . user program memory ffffh 2kbyte f800h f7ffh 62kbyte 0000h 04741-0-029 figure 28. flash/ee program memory map in normal mode in normal mode, the 62 kbytes of flash/ee program memory can be programmed by serial downloading and by parallel programming. serial downloading (in-circuit programming) the ADUC845/aduc847/ad uc848 facilitates code download via the standard uart serial port. the parts enter serial down- load mode after a reset or a power cycle if the psen pin is pulled low through an external 1 k? resistor. once in serial download mode, the hidden embedded download kernel executes. this allows the user to download code to the full 62 kbytes of flash/ee program memory while the device is in circuit in its target application hardware. a pc serial download executable (wsd.exe) is provided as part of the ADUC845/aduc847/aduc848 quick start development system. application note uc004 fully describes the serial download protocol that is used by the embedded download kernel. this application note is available at www.analog.com/microconverter . parallel programming the parallel programming mode is fully compatible with conventional third-party flash or eeprom device programmers. a block diagram of the external pin configuration required to support parallel programming is shown in figure 29. in this mode, ports 0 and 2 operate as the external address bus interface, p3 operates as the external data bus interface, and p1.0 operates as the write enable strobe. p1.1, p1.2, p1.3, and p1.4 are used as general configuration ports that configures the device for various program and erase operations during parallel programming. p1.4?p1.1 p3.7?p3.0 ea reset ADUC845/ aduc847/ aduc848 +5v c ommand p1.7?p1.5 timing data 04741-0-030 enable gnd v dd p1.0 figure 29. flash/ee memory parallel programming the command words that are assigned to p1.1, p1.2, p1.3, and p1.4 are described in table 31. table 31. flash/ee memory parallel programming modes port 1 pins p1.4 p1.3 p1.2 p1.1 programming mode 0 0 0 0 erase flash/ee program, data, and security mode 1 0 1 0 program code byte 0 0 1 0 program data byte 1 0 1 1 read code byte 0 0 1 1 read data byte 1 1 0 0 program security modes 1 1 0 1 read/verify security modes all other codes redundant
ADUC845/aduc847/aduc848 rev. a | page 50 of 108 user download mode (uload) figure 28 shows that it is possible to use the 62 kbytes of flash/ee program memory available to the user as one single block of memory. in this mode, all the flash/ee memory is read-only to user code. however, most of the flash/ee program memory can also be written to during run time simply by entering uload mode. in uload mode, the lower 56 kbytes of program memory can be erased and reprogrammed by the user software as shown in figure 30. uload mode can be used to upgrade the code in the field via any user-defined download protocol. by configuring the spi port on the ADUC845/aduc847/aduc848 as a slave, it is possible to completely reprogram the 56 kbytes of flash/ee program memory in under 5 s (see application note uc007, user download mode at www.analog.com/microconverter ). alternatively, uload mode can be used to save data to the 56 kbytes of flash/ee memory. this can be extremely useful in data logging applications where the parts can provide up to 60 kbytes of data memory on-chip (4 kbytes of dedicated flash/ee data memory also exist). the upper 6 kbytes of the 62 kbytes of flash/ee program memory (8 kbytes on the 32-kbyte parts) are programmable only via serial download or parallel programming. this means that this space appears as read-only to user code; therefore, it cannot be accidentally erased or reprogrammed by erroneous code execution, making it very suitable to use the 6 kbytes as a bootloader. a bootload enable option exists in the windows? serial downloader (wsd) to always run from e000h after reset. if using a bootloader, this option is recommended to ensure that the bootloader always executes correct code after reset. programming the flash/ee program memory via uload mode is described in the flash/ee memory control sfr section of econ and also in application note uc007 (www.analog.com/microconverter). embedded download/debug kernel permanently embedded firmware allows code to be downloaded to any of the 62 kbytes of on-chip program memory. the kernel program appears as nop instructions to user code. user bootloader space the user bootloader space can be programmed in download/debug mode via the kernel but is read only when executing user code user downloader space either the download/debug kernel or user code (in uload mode) can program this space ffffh 2kbyte f800h f7ffh 6kbyte e000h dfffh 56kbyte 0000h 04741-0-031 62 kbytes of user code memory figure 30. flash/ee program memory map in uload mode (62-kbyte part) the 32-kbyte memory parts have the user bootload space starting at 6000h. the memory mapping is shown in figure 31. embedded download/debug kernel permanently embedded firmware allows code to be downloaded to any of the 32 kbytes of on-chip program memory. the kernel program appears as nop instructions to user code. user bootloader space the user bootloader space can be programmed in download/debug mode via the kernel but is read only when executing user code user downloader space either the download/debug kernel or user code (in uload mode) can program this space not available to user ffffh 2kbyte f800h 8000h 8kbyte 6000h 5fffh 24kbyte 0000h 04741-a-002 32 kbytes of user code memory figure 31. flash/ee program memory map in uload mode (32-kbyte part) uload mode is not available on the 8-kbyte flash/ee program memory parts. flash/ee program memory security the ADUC845/aduc847/ad uc848 facilitate three modes of flash/ee program memory security: the lock, secure, and serial safe modes. these modes can be independently activated, restricting access to the internal code space. they can be enabled as part of serial download protocol, as described in application note uc004, or via parallel programming. lock mode this mode locks the code memory, disabling parallel program- ming of the program memory. however, reading the memory in parallel mode and reading the memory via a movc command from external memory are still allowed. this mode is deactivated by initiating an erase code and data command in serial download or parallel programming modes. secure mode this mode locks the code memory, disabling parallel program- ming of the program memory. reading/verifying the memory in parallel mode and reading the internal memory via a movc command from external memory are also disabled. this mode is deactivated by initiating an erase code and data command in serial download or parallel programming modes. serial safe mode this mode disables serial download capability on the device. if serial safe mode is activated and an attempt is made to reset the part into serial download mode, that is, reset asserted (pulled high) and de-asserted (pulled low) with psen low, the part interprets the serial download reset as a normal reset only. it therefore does not enter serial download mode, but executes only a normal reset sequence. serial safe mode can be disabled only by initiating an erase code and data command in parallel programming mode.
ADUC845/aduc847/aduc848 rev. a | page 51 of 108 using flash/ee data memory the 4 kbytes of flash/ee data memory are configured as 1024 pages, each of 4 bytes. as with the other ADUC845/aduc847/ aduc848 peripherals, the interface to this memory space is via a group of registers mapped in the sfr space. a group of four data registers (edata1C4) holds the 4 bytes of data at each page. the page is addressed via the eadrh and eadrl registers. finally, econ is an 8-bit control register that can be written to with one of nine flash/ee memory access commands to trigger various read, write, erase, and verify functions. a block diagram of the sfr interface to the flash/ee data memory array is shown in figure 32. econflash/ee memory control sfr programming either flash/ee data memory or flash/ee program memory is done through the flash/ee memory control sfr (econ). this sfr allows the user to read, write, erase, or verify the 4 kbytes of flash/ee data memory or the 56 kbytes of flash/ee program memory. byte 1 (0000h) edata1 sfr byte 1 (0004h) byte 1 (0008h) byte 1 (000ch) byte 1 (0ff8h) byte 1 (0ffch) byte 2 (0001h) edata2 sfr byte 2 (0005h) byte 2 (0009h) byte 2 (000dh) byte 2 (0ff9h) byte 2 (0ffdh) byte 3 (0002h) edata3 sfr byte 3 (0006h) byte 3 (000ah) byte 3 (000eh) byte 3 (0ffah) byte 3 (0ffeh) byte 4 (0003h) edata4 sfr byte 4 (0007h) byte 4 (000bh) byte 4 (000fh) byte 4 (0ffbh) (0fffh) 01h 00h 02h 03h 3feh 3ffh page address (eadrh/l) byte addresses are given in brackets 04741-0-032 byte 4 figure 32. flash/ee data memory control and configuration table 32. econflash/ee memory commands econ value command description (normal mode, power-on default) command description (uload mode) 01h read 4 bytes in the flash/ee data memory, addressed by the page address eadrh/l, are read into edata1C4. not implemented. use the movc instruction. 02h write results in 4 bytes in edata1C4 being written to the flash/ee data memory, at the page address given by eadrh (0 eadrh < 0400h). note that the 4 bytes in the page being addressed must be pre-erased. bytes 0 to 255 of internal xram are written to the 256 bytes of flash/ee program memory at the page address given by eadrh/l (0 eadrh/l < e0h). note that the 256 bytes in the page being addressed must be pre-erased. 03h reserved. reserved. 04h verify verifies that the data in ed ata1C4 is contained in the page address given by eadrh/l. a subsequent read of the econ sfr results in a 0 being read if the verification is valid, or a nonzero value being read to indicate an invalid verification. not implemented. use the movc and movx instructions to verify the write in software. 05h erase page 4-byte page of flash/ee data memory address is erased by the page address eadrh/l. 64-byte page of flash/ee program memory addressed by the byte address eadrh/l is erased. a new page starts when eadrl is equal to 00h, 80h, or c0h. 06h erase all 4 kbytes of flash/ee data memory are erased. the entire 56 kbytes of uload are erased. 81h readbyte the byte in the flash/ee data memory, addressed by the byte address eadrh/l, is read into edata1 (0 eadrh/l 0fffh). not implemented. use the movc command. 82h writebyte the byte in edata1 is written into flash/ee data memory at the byte address eadrh/l. the byte in edata1 is written into flash/ee program memory at the byte address eadrh/l (0 eadrh/l dfffh). 0fh exuload configures the econ instructions (above) to operate on flash/ee data memory. enters normal mode, directing su bsequent econ instructions to operate on the flash/ee data memory. f0h uload enters uload mode; subsequent econ instructions operate on flash/ee program memory. enables the econ instructions to operate on the flash/ee program memory. uload entry mode.
ADUC845/aduc847/aduc848 rev. a | page 52 of 108 example: programming the flash/ee data memory a user wants to program f3h into the second byte on page 03h of the flash/ee data memory space while preserving the other 3 bytes already in this page. a typical program of the flash/ee data array involves 1. setting eadrh/l with the page address. 2. writing the data to be programmed to the edata1C4. 3. writing the econ sfr with the appropriate command. step 1: set up the page address address registers eadrh and eadrl hold the high byte address and the low byte address of the page to be addressed. the assembly language to set up the address may appear as mov eadrh, #0 ;set page address pointer mov eadrl, #03h step 2: set up the edata registers write the four values to be written into the page into the four sfrs edata1C4. unfortunately, the user does not know three of them. thus, the user must read the current page and overwrite the second byte. mov econ, #1 ;read page into edata1-4 mov edata2, #0f3h ;overwrite byte 2 step 3: program page a byte in the flash/ee array can be programmed only if it has previously been erased. specifically, a byte can be programmed only if it already holds the value ffh. because of the flash/ee architecture, this erasure must happen at a page level; therefore, a minimum of 4 bytes (1 page) are erased when an erase command is initiated. once the page is erased, the user can program the 4 bytes in-page and then perform a verification of the data. mov econ, #5 ;erase page mov econ, #2 ;write page mov econ, #4 ;verify page mov a, econ ;check if econ = 0 (ok!) although the 4 kbytes of flash/ee data memory are factory pre- erased, that is, byte locations set to ffh, it is good programming practice to include an eraseall routine as part of any configuration/set-up code running on the parts. an eraseall command consists of writing 06h to the econ sfr, which initiates an erase of the 4-kbyte flash/ee array. this command coded in 8051 assembly language would appear as mov econ, #06h ;erase all command ;2ms duration flash/ee memory timing typical program and erase times for the parts are as follows: normal mode (operating on flash/ee data memory) command bytes affected readpage 4 bytes 25 machine cycles writepage 4 bytes 380 s verifypage 4 bytes 25 machine cycles erasepage 4 bytes 2 ms eraseall 4 kbytes 2 ms readbyte 1 byte 10 machine cycles writebyte 1 byte 200 s uload mode (operating on flash/ee program memory) writepage 256 bytes 15 ms erasepage 64 bytes 2 ms eraseall 56 kbytes 2 ms writebyte 1 byte 200 s note that a given mode of operation is initiated as soon as the command word is written to the econ sfr. the core micro- controller operation is idled until the requested program/read or erase mode is completed. in practice, this means that even though the flash/ee memory mode of operation is typically initiated with a two-machine-cycle mov instruction (to write to the econ sfr), the next instruction is not executed until the flash/ee operation is complete. this means that the core cannot respond to interrupt requests until the flash/ee operation is complete, although the core peripheral functions such as counter/ timers continue to count as configured throughout this period.
ADUC845/aduc847/aduc848 rev. a | page 53 of 108 dac circuit information the ADUC845/aduc847/ aduc848 incorporate a 12-bit, voltage output dac on-chip. it has a rail-to-rail voltage output buffer capable of driving 10 k?/100 pf, and has two selectable ranges, 0 v to v ref and 0 v to av dd . it can operate in 12-bit or 8-bit mode. the dac has a control register, daccon, and two data registers, dach/l. the dac output can be programmed to appear at pin 14 or pin 13 (aincom). note that in 12-bit mode, the dac voltage output is updated as soon as the dacl data sfr is written; therefore, the dac data registers should be updated as dach first, followed by dacl. the 12-bit dac data should be written into dach/l right- justified such that dacl contains the lower 8 bits, and the lower nibble of dach contains the upper 4 bits. daccon control register sfr address: fdh power-on default: 00h bit addressable: no table 33. daccondac configuration commands bit no. name description 7 CCC not implemented. write dont care. 6 CCC not implemented. write dont care. 5 CCC not implemented. write dont care. 4 dacpin dac output pin select. set to 1 by the user to direct the dac output to pin 13 (aincom). cleared to 0 by the user to direct the dac output to pin 14 (dac). 3 dac8 dac 8-bit mode bit. set to 1 by the user to enable 8-bit dac operation. in this mode, the 8 bits in dacl sfr are routed to the 8 msbs of the dac, and the 4 lsbs of the dac are set to 0. cleared to 0 by the user to enable 12-bit dac operation. in this mode, the 8 lsbs of the result are routed to dacl, and the upper 4 msb bits are routed to the lower 4 bits of dach. 2 dacrn dac output range bit. set to 1 by the user to configure the dac range of 0 v to av dd . cleared to 0 by the user to configure the dac range of 0 v to 2.5 v (v ref ). 1 dacclr dac clear bit. set to 1 by the user to enable normal dac operation. cleared to 0 by the user to reset the dac data registers dacl/h to 0. 0 dacen dac enable bit. set to 1 by the user to enable normal dac operation. cleared to 0 by the user to power down the dac. dach/dacl data registers these dac data registers are written to by the user to update the dac output. s fr address: dacl (dac data low byte)fbh dach (dac data high byte)fch power-on default: 00h (both registers) bit addressable: no (both registers)
ADUC845/aduc847/aduc848 rev. a | page 54 of 108 using the dac the on-chip dac architecture consists of a resistor string dac followed by an output buffer amplifier, the functional equivalent of which is shown in figure 33. output buffer high-z disable (from mcu) r r r r r av dd v ref 04741-0-033 14 figure 33. resistor string dac functional equivalent features of this architecture include inherent guaranteed monotonicity and excellent differential linearity. as shown in figure 33, the reference source for the dac is user-selectable in software. it can be either av dd or v ref . in 0 v-to-av dd mode, the dac output transfer function spans from 0 v to the voltage at the av dd pin. in 0 v-to-v ref mode, the dac output transfer function spans from 0 v to the internal v ref (2.5 v). the dac output buffer amplifier features a true rail-to-rail output stage implementation. this means that, unloaded, each output is capable of swinging to within less than 100 mv of both av dd and ground. moreover, the dacs linearity specification (when driving a 10 k? resistive load to ground) is guaranteed through the full transfer function except codes 0 to 48 in 0 v-to-v ref mode and 0 to 100 and 3950 to 4095 in 0 v-to-v dd mode. linearity degradation near ground and v dd is caused by satura- tion of the output amplifier; a general representation of its effects (neglecting offset and gain error) is shown in figure 34. the dotted line indicates the ideal transfer function, and the solid line represents what the transfer function might look like with endpoint nonlinearities due to saturation of the output amplifier. note that figure 34 represents a transfer function in 0-to-v dd mode only. in 0 v-to-v ref mode (with v ref < v dd ), the lower nonlinearity would be similar, but the upper portion of the transfer function would follow the ideal line to the end, showing no signs of the high-end endpoint linearity error. v dd ?50mv v dd v dd ?100mv 100mv 50mv 0mv 000h fffh 04741-0-034 figure 34. endpoint nonlinearities due to amplifier saturation the endpoint nonlinearities shown in figure 34 become worse as a function of output loading. most data sheet specifications assume a 10 k? resistive load to ground at the dac output. as the output is forced to source or sink more current, the nonlinear regions at the top or bottom, respectively, of figure 34 become larger. with larger current demands, this can significantly limit output voltage swing. figure 35 and figure 36 illustrate this behavior. note that the upper trace in each of these figures is valid only for an output range selection of 0 v to av dd . in 0 v- to-v ref mode, dac loading does not cause high-side voltage nonlinearities while the reference voltage remains below the upper trace in the corresponding figure. for example, if av dd = 3 v and v ref = 2.5 v, the high-side voltage is not affected by loads of less than 5 ma. but around 7 ma, the upper curve in figure 36 drops below 2.5 v (v ref ), indicating that at these higher currents, the output is not capable of reaching v ref . source/sink current (ma) 5 0 5 10 15 output voltage (v) 4 3 2 1 0 dac loaded with 0000h dac loaded with 0fffh 04741-0-035 figure 35. source and sink current capability with v ref = av dd = 5 v
ADUC845/aduc847/aduc848 rev. a | page 55 of 108 source/sink current (ma) 3 0 5 10 15 output voltage (v) 2 1 0 dac loaded with 0000h dac loaded with 0fffh 04741-0-036 figure 36. source and sink current capability with v ref = av dd = 3 v for larger loads, the current drive capability may not be sufficient. to increase the source and sink current capability of the dac, an external buffer should be added as shown in figure 37. ADUC845/ aduc847/ aduc848 dac 04741-0-037 14 figure 37. buffering the dac output the internal dac output buffer also features a high impedance disable function. in the chips default power-on state, the dac is disabled and its output is in a high impedance state (or three- state) where it remains inactive until enabled in software. this means that if a zero output is desired during power-on or power-down transient conditions, a pull-down resistor must be added to each dac output. assuming that this resistor is in place, the dac output remains at ground potential whenever the dac is disabled. pulse-width modulator (pwm) the ADUC845/aduc847/ad uc848 has a highly flexible pwm offering programmable resolution and an input clock. the pwm can be configured in six different modes of operation. two of these modes allow the pwm to be configured as a - ? dac with up to 16 bits of resolution. a block diagram of the pwm is shown in figure 38. clock select programmable divider compare mode pwm0h/l pwm1h/l 12.583mhz (f vco) 32.768khz/15 32.768khz (f xtal) external clock on p2.7 p2.5 p2.6 16-bit pwm counter 04741-0-038 figure 38. pwm block diagram the pwm uses control sfr, pwmcon, and four data sfrs: pwm0h, pwm0l, pwm1h, and pwm1l. pwmcon (as described in table 34) controls the different modes of operation of the pwm as well as the pwm clock frequency. pwm0h/l and pwm1h/l are the data registers that determine the duty cycles of the pwm outputs at p2.5 and p2.6. to use the pwm user software, first write to pwmcon to select the pwm mode of operation and the pwm input clock. writing to pwmcon also resets the pwm counter. in any of the 16-bit modes of operation (modes 1, 3, 4, 6), user software should write to the pwm0l or pwm1l sfrs first. this value is written to a hidden sfr. writing to the pwm0h or pwm1h sfrs updates both the pwmxh and the pwmxl sfrs but does not change the outputs until the end of the pwm cycle in progress. the values written to these 16-bit registers are then used in the next pwm cycle.
ADUC845/aduc847/aduc848 rev. a | page 56 of 108 pwmcon pwm control sfr sfr address: aeh power-on default: 00h bit addressable: no table 34. pwmcon pwm control sfr bit no. name description 7 CCC not implemented. write dont care. pmw mode selection. pwm2 pwm1 pwm0 0 0 0 mode 0: pwm disabled. 0 0 1 mode 1: single 16-bit output with programmable pulse and cycle time. 0 1 0 mode 2: twin 8-bit outputs. 0 1 1 mode 3: twin 16-bit outputs. 1 0 0 mode 4: dual 16-bit pulse density outputs. 1 0 1 mode 5: dual 8-bit outputs. 1 1 0 mode 6: dual 16-bit pulse density rz outputs. 6, 5, 4 pwm2, pwm1, pwm0 1 1 1 mode 7: pwm counter re set with outputs not used. pwm clock source divider. pws1 pws0 0 0 selected clock. 0 1 selected clock divided by 4. 1 0 selected clock divided by 16. 3, 2 pws1, pws0 1 1 selected clock divided by 64. pwm clock source selection. pwc1 pwc0 0 0 f xtal /15 (2.184 khz). 0 1 f xtal (32.768 khz). 1 0 external input on p2.7. 1, 0 pwc1, pwc0 1 1 f vco (12.58 mhz). pwm pulse width high byte (pwm0h) sfr address: b2h power-on default: 00h bit addressable: no table 35. pwm0h: pwm pulse width high byte pwm0h.7 pwm0h.6 pwm0h.5 pwm0h.4 pwm0h.3 pwm0h.2 pwm0h.1 pwm0h.0 0 0 0 0 0 0 0 0 r/w r/w r/w r/w r/w r/w r/w r/w pwm pulse width low byte (pwm0l) sfr address: b1h power-on default: 00h bit addressable: no table 36. pwm0l: pwm pulse width low byte pwm0l.7 pwm0l.6 pwm0l.5 pwm0l.4 pwm0l.3 pwm0l.2 pwm0l.1 pwm0l.0 0 0 0 0 0 0 0 0 r/w r/w r/w r/w r/w r/w r/w r/w
ADUC845/aduc847/aduc848 rev. a | page 57 of 108 pwm cycle width high byte (pwm1h) sfr address: b4h power-on default: 00h bit addressable: no table 37. pwm1h: pwm cycle width high byte pwm1h.7 pwm1h.6 pwm1h.5 pwm1h.4 pwm1h.3 pwm1h.2 pwm1h.1 pwm1h.0 0 0 0 0 0 0 0 0 r/w r/w r/w r/w r/w r/w r/w r/w pwm cycle width low byte (pwm1l) sfr address: b3h power-on default: 00h bit addressable: no table 38. pwm1l: pwm cycle width low byte pwm1l.7 pwm1l.6 pwm1l.5 pwm1l.4 pwm1l.3 pwm1l.2 pwm1l.1 pwm1l.0 0 0 0 0 0 0 0 0 r/w r/w r/w r/w r/w r/w r/w r/w mode 0 in mode 0, the pwm is disabled, allowing p2.5 and p2.6 to be used as normal digital i/os. mode 1 (single-variable resolution pwm) in mode 1, both the pulse length and the cycle time (period) are programmable in user code, allowing the resolution of the pwm to be variable. pwm1h/l sets the period of the output waveform. reducing pwm1h/l reduces the resolution of the pwm output but increases the maximum output rate of the pwm. for example, setting pwm1h/l to 65536 gives a 16-bit pwm with a maximum output rate of 192 hz (12.583 mhz/65536). setting pwm1h/l to 4096 gives a 12-bit pwm with a maximum output rate of 3072 hz (12.583 mhz/4096). pwm0h/l sets the duty cycle of the pwm output waveform as shown in figure 39. p2.6 pwm counter pwm1h/l 0 pwm0h/l 04741-0-039 figure 39. pwm in mode 1 mode 2 (twin 8-bit pwm) in mode 2, the duty cycle and the resolution of the pwm outputs are programmable. the maximum resolution of the pwm output is 8 bits. pwm1l sets the period for both pwm outputs. typically, this is set to 255 (ffh) to give an 8-bit pwm, although it is possible to reduce this as necessary. a value of 100 could be loaded here to give a percentage pwm, that is, the pwm is accurate to 1%. the outputs of the pwm at p2.5 and p2.6 are shown in figure 40. as can be seen, the output of pwm0 (p2.5) goes low when the pwm counter equals pwm0l. the output of pwm1 (p2.6) goes high when the pwm counter equals pwm1h and goes low again when the pwm counter equals pwm0h. setting pwm1h to 0 ensures that both pwm outputs start simultaneously. p2.6 p2.5 pwm counter pwm1h 0 pwm1l pwm0h pwm0l 04741-0-040 figure 40. pwm mode 2
ADUC845/aduc847/aduc848 rev. a | page 58 of 108 mode 3 (twin 16-bit pwm) in mode 3, the pwm counter is fixed to count from 0 to 65536, giving a fixed 16-bit pwm. operating from the 12.58 mhz core clock results in a pwm output rate of 192 hz. the duty cycle of the pwm outputs at p2.5 and p2.6 are independently programmable. as shown in figure 41, while the pwm counter is less than pwm0h/l, the output of pwm0 (p2.5) is high. once the pwm counter equals pwm0h/l, pwm0 (p2.5) goes low and remains low until the pwm counter rolls over. similarly, while the pwm counter is less than pwm1h/l, the output of pwm1 (p2.6) is high. once the pwm counter equals pwm1h/l, pwm1 (p2.6) goes low and remains low until the pwm counter rolls over. in this mode, both pwm outputs are synchronized, that is, once the pwm counter rolls over to 0, both pwm0 (p2.5) and pwm1 (p2.6) go high. p2.6 p2.5 pwm counter pwm1h/l 0 65536 pwm0h/l 04741-0-041 figure 41. pwm mode 3 mode 4 (dual nrz 16-bit - ? dac) mode 4 provides a high speed pwm output similar to that of a - ? dac. typically, this mode is used with the pwm clock equal to 12.58 mhz. in this mode, p1.0 and p1.1 are updated every pwm clock (80 ns in the case of 12.58 mhz). over any 65536 cycles (16-bit pwm), pwm0 (p1.0) is high for pwm0h/l cycles and low for (65536 C pwm0h/l) cycles. similarly, pwm1 (p1.1) is high for pwm1h/l cycles and low for (65536 C pwm1h/l) cycles. if pwm1h is set to 4010h (slightly above one-quarter of fs), typically p1.1 is low for three clocks and high for one clock (each clock is approximately 80 ns). over every 65536 clocks, the pwm compromises for the fact that the output should be slightly above one-quarter of full scale, by having a high cycle followed by only two low cycles. 12.583mhz 16-bit 80 s 0 16-bit 16-bit 16-bit 16-bit 16-bit carry out at p2.5 carry out at p2.6 pwm0h/l = c000h pwm1h/l = 4000h 0 1 00 latch 0 111 11 0 04741-0-042 80 s figure 42. pwm mode 4 for faster dac outputs (at lower resolution), write 0s to the lsbs that are not required with a 1 in the lsb position. if, for example, only 12-bit performance is required, write 0001 to the 4 lsbs. this means that a 12-bit accurate - dac output can occur at 3 khz. similarly, writing 00000001 to the 8 lsbs gives an 8-bit accurate - dac output at 49 khz.
ADUC845/aduc847/aduc848 rev. a | page 59 of 108 mode 5 (dual 8-bit pwm) in mode 5, the duty cycle and the resolution of the pwm outputs are individually programmable. the maximum resolution of the pwm output is 8 bits. p2.6 p2.5 pwm counters pwm1h 0 pwm1l pwm0h pwm0l 04741-0-043 figure 43. pwm mode 5 mode 6 (dual rz 16-bit - ? dac) mode 6 provides a high speed pwm output similar to that of a - dac. mode 6 operates very similarly to mode 4; however, the key difference is that mode 6 provides return to zero (rz) - dac output. mode 4 provides non-return-to-zero - dac outputs. rz mode ensures that any difference in the rise and fall times does not affect the - dac inl. however, rz mode halves the dynamic range of the - dac outputs from 0 v? to av dd down to 0 v to av dd /2. for best results, this mode should be used with a pwm clock divider of 4. if pwm1h is set to 4010h (slightly above one-quarter of fs), typically p2.6 is low for three full clocks (3 80 ns), high for one-half a clock (40 ns), and then low again for one-half a clock (40 ns) before repeating itself. over every 65536 clocks, the pwm compromises for the fact that the output should be slightly above one-quarter of full scale by leaving the output high for two half clocks in four every so often. for faster dac outputs (at lower resolution), write 0s to the lsbs that are not required with a 1 in the lsb position. if, for example, only 12-bit performance is required, write 0001 to the 4 lsbs. this means that a 12-bit accurate - dac output can occur at 3 khz. similarly, writing 00000001 to the 8 lsbs gives an 8-bit accurate - dac output at 49 khz. the output resolution is set by the pwm1l and pwm1h sfrs for the p2.5 and p2.6 outputs, respectively. pwm0l and pwm0h set the duty cycles of the pwm outputs at p2.5 and p2.6, respectively. both pwms have the same clock source and clock divider. 3.146mhz 16-bit 318 s 0 16-bit 16-bit 16-bit 16-bit 16-bit carry out at p2.5 carry out at p2.6 pwm0h/l = c000h pwm1h/l = 4000h 0 1 0 000 latch 0 11 1 11 0 318 s 0, 3/4, 1/2, 1/4, 0 04741-0-044 figure 44. pwm mode 6 mode 7 in mode 7, the pwm is disabled, allowing p2.5 and p2.6 to be used as normal.
ADUC845/aduc847/aduc848 rev. a | page 60 of 108 on-chip pll (pllcon) the ADUC845/aduc847/ad uc848 are intended for use with a 32.768 khz watch crystal. a pll locks onto a multiple (384) of this to provide a stable 12.582912 mhz clock for the system. the core can operate at this frequency or at binary submultiples of it to allow power saving when maximum core performance is not required. the default core clock is the pll clock divided by 8 or 1.572864 mhz. the adc clocks are also derived from the pll clock, with the modulator rate being the same as the crystal oscillator frequency. the control register for the pll is called pllcon and is described as follows. the 5 v parts can be set to a maximum core frequency of 12.58 mhz (cd2...0 = 000) while at 3 v, the maximum core clock rate is 6.29 mhz (cd2...0 = 001). the cd bits should not be set to 000b on the 3 v parts. the 3 v parts are limited to a core clock speed of 6.29 mhz (cd = 1). pllcon pll control register sfr address: d7h power-on default: 53h bit addressable: no table 39. pllcon pll control register bit no. name description 7 osc_pd oscillator power-down bit. if low, the 32 khz crystal oscillator continues running in power-down mode. if high, the 32.768 khz oscillator is powered down. when this bit is low, the seconds counter continues to count in power-down mode and can interrupt the cpu to exit power-down. the oscillator is always enabled in normal mode. 6 lock pll lock bit. this is a read-only bit. set automatically at power-on to indicate that the pll l oop is correctly tracking the crystal clock. after power- down, this bit can be polled to wait for the pll to lock. cleared automatically at power-on to indicate that the pll is not correctly tracking the crystal clock. this might be due to the absence of a crystal clock or an ex ternal crystal at power-on. in this mode, the pll output can be 12.58 mhz 20%. after the part wakes up from power -down, user code can poll this bit to wait for the pll to lock. if lock = 0, the pll is not locked. 5 CCC not implemented. write dont care. 4 ltea ea status. read-only bit. reading this bi t returns the state of the external ea pin latched at reset or power-on. 3 fint fast interrupt response bit. set by the user to enable the respon se to any interrupt to be executed at the fastest core clock frequency. cleared by the user to disable the fast interrupt response feature. cpu (core clock) divider bits. this number determines the frequency at which the core operates. cd2 cd1 cd0 core clock frequency (mhz) 0 0 0 12.582912 0 0 1 6.291456 (maximum core clock rate allowed on the 3 v parts) 0 1 0 3.145728 0 1 1 1.572864 (default core frequency) 1 0 0 0.786432 1 0 1 0.393216 1 1 0 0.196608 2, 1, 0 cd2, cd1, cd0 1 1 1 0.098304
ADUC845/aduc847/aduc848 rev. a | page 61 of 108 i 2 c serial interface the ADUC845/aduc847/ aduc848 support a fully licensed i 2 c serial interface. the i 2 c interface is implemented as a full hardware slave and software master. sdata (pin 27 on the mqfp package and pin 29 on the csp package) is the data i/o pin. sclk (pin 26 on the mqfp package and pin 28 on the csp package) is the serial interface clock for the spi interface. the i 2 c interface on the parts is fully independent of all other pin/ function multiplexing. the i 2 c interface incorporated on the ADUC845/aduc847/aduc848 also includes a second address register (i2cadd1) at sfr address f2h with a default power- on value of 7fh. the i 2 c interface is always available to the user and is not multiplexed with any other i/o functionality on the chip. this means that the i 2 c and spi interfaces can be used at the same time. note that when using the i 2 c and spi interfaces simultaneously, they both use the same interrupt routine (vector address 3bh). when an interrupt occurs from one of these, it is necessary to interrogate each interface to see which one has triggered the isr request. the four sfrs are used to control the i 2 c interface are described next. i2cconi 2 c control register sfr address: e8h power-on default: 00h bit addressable: yes table 40. i2ccon sfr bit designations bit no. name description 7 mdo i 2 c software master data output bit (master mode only). this data bit is used to implement a master i 2 c transmitter interface in software. da ta written to this bit is output on the sdata pin if the data outp ut enable bit (mde) is set. 6 mde i 2 c software output enable bit (master mode only). set by the user to enable the sdata pin as an output (tx). cleared by the user to enable the sdata pin as an input (rx). 5 mco i 2 c software master clock output bit (master mode only). this bit is used to impleme nt the sclk for a master i 2 c transmitter in software. data wr itten to this bit is output on the sclk pin. 4 mdi i 2 c software master data input bit (master mode only). this data bit is used to implement a master i 2 c receiver interface in software. data on the sdata pin is latched into this bit on an sclk transition if th e data output enable (mde) bit is 0. 3 i2cm i 2 c master/slave mode bit. set by the user to enable i 2 c software master mode. cleared by the user to enable i 2 c hardware slave mode. 2 i2crs i 2 c reset bit (slave mode only). set by the user to reset the i 2 c interface. cleared by the user code for normal i 2 c operation. 1 i2ctx i 2 c direction transfer bit (slave mode only). set by the microconverter if the i 2 c interface is transmitting. cleared by the microconverter if the i 2 c interface is receiving. 0 i2ci i 2 c interrupt bit (slave mode only). set by the microconverter after a byte has been transmitted or received. cleared by the microconverter when the user code reads the i2cdat sfr. i2ci should not be cleared by user code.
ADUC845/aduc847/aduc848 rev. a | page 62 of 108 i2caddi 2 c address register 1 function: holds one of the i 2 c peripheral addresses for the part. it may be overwritten by user code. application note uc001 at http://www.analog.com/microconverter describes the format of the i 2 c standard 7-bit address. sfr address: 9bh power-on default: 55h bit addressable: no i2cadd1i 2 c address register 2 function: same as the i2cadd. sfr address: f2h power-on default: 7fh bit addressable: no i2cdati 2 c data register function: the i2cdat sfr is written to by user code to transmit data, or read by user code to read data just received by the i 2 c interface. accessing i2cdat automatically clears any pending i 2 c interrupt and the i2ci bit in the i2ccon sfr. user code should access i2cdat only once per interrupt cycle. sfr address: 9ah power-on default: 00h bit addressable: no the main features of the microconverter i 2 c interface are ? only two bus lines are required: a serial data line (sdata) and a serial clock line (sclock). ? an i 2 c master can communicate with multiple slave devices. because each slave device has a unique 7-bit address, single master/slave relationships can exist at all times even in a multislave environment. ? the ability to respond to two separate addresses when operating in slave mode. ? on-chip filtering rejects <50 ns spikes on the sdata and the sclock lines to preserve data integrity. dv dd i 2 c master i 2 c slave 1 i 2 c slave 2 04741-0-045 figure 45. typical i 2 c system software master mode the ADUC845/aduc847/ aduc848 can be used as an i 2 c master device by configuring the i 2 c peripheral in master mode and writing software to output the data bit-by-bit. this is referred to as a software master. master mode is enabled by setting the i2cm bit in the i2ccon register. to transmit data on the sdata line, mde must be set to enable the output driver on the sdata pin. if mde is set, the sdata pin is pulled high or low depending on whether the mdo bit is set or cleared. mco controls the sclock pin and is always configured as an output in master mode. in master mode, the sclock pin is pulled high or low depending on the whether mco is set or cleared. to receive data, mde must be cleared to disable the output driver on sdata. software must provide the clocks by toggling the mco bit and reading the sdata pin via the mdi bit. if mde is cleared, mdi can be used to read the sdata pin. the value of the sdata pin is latched into mdi on a rising edge of sclock. mdi is set if the sdata pin is high on the last rising edge of sclock. mdi is cleared if the sdata pin is low on the last rising edge of sclock. software must control mdo, mco, and mde appropriately to generate the start condition, slave address, acknowledge bits, data bytes, and stop conditions. these functions are described in application note uc001.
ADUC845/aduc847/aduc848 rev. a | page 63 of 108 hardware slave mode after reset, the ADUC845/aduc847/aduc848 default to hardware slave mode. the i 2 c interface is enabled by clearing the spe bit in spicon. slave mode is enabled by clearing the i2cm bit in i2ccon. the parts have a full hardware slave. in slave mode, the i 2 c address is stored in the i2cadd register. data received or to be transmitted is stored in the i2cdat register. once enabled in i 2 c slave mode, the slave controller waits for a start condition. if the parts detect a valid start condition, followed by a valid address, followed by the r/w bit, then the i2ci interrupt bit is automatically set by hardware. the i 2 c peripheral generates a core interrupt only if the user has pre- configured the i 2 c interrupt enable bit in the ieip2 sfr as well as the global interrupt bit, ea, in the ie sfr. therefore, mov ieip2, #01h ;enable i 2 c interrupt setb ea an autoclear of the i2ci bit is implemented on the parts so that this bit is cleared automatically upon read or write access to the i2cdat sfr. mov i2cdat, a ;i2ci auto-cleared mov a, i2cdat ;i2ci auto-cleared if for any reason the user tries to clear the interrupt more than once, that is, access the data sfr more than once per interrupt, the i 2 c controller stops. the interface then must be reset by using the i2crs bit. the user can choose to poll the i2ci bit or to enable the interrupt. in the case of the interrupt, the pc counter vectors to 003bh at the end of each complete byte. for the first byte, when the user gets to the i2ci isr, the 7-bit address and the r/w bit appear in the i2cdat sfr. the i2ctx bit contains the r/w bit sent from the master. if i2ctx is set, the master is ready to receive a byte; therefore the slave transmits data by writing to the i2cdat register. if i2ctx is cleared, the master is ready to transmit a byte; therefore the slave receives a serial byte. software can interrogate the state of i2ctx to determine whether it should write to or read from i2cdat. once the part has received a valid address, hardware holds sclock low until the i2ci bit is cleared by software. this allows the master to wait for the slave to be ready before transmitting the clocks for the next byte. the i2ci interrupt bit is set every time a complete data byte is received or transmitted, provided that it is followed by a valid ack. if the byte is followed by a nack, an interrupt is not generated. the part continues to issue interrupts for each complete data byte transferred until a stop condition is received or the interface is reset. when a stop condition is received, the interface resets to a state in which it is waiting to be addressed (idle). similarly, if the interface receives a nack at the end of a sequence, it also returns to the default idle state. the i2crs bit can be used to reset the i 2 c interface. this bit can be used to force the interface back to the default idle state.
ADUC845/aduc847/aduc848 rev. a | page 64 of 108 spi serial interface the ADUC845/aduc847/ aduc848 integrate a complete hardware serial peripheral interface (spi) interface on-chip. spi is an industry-standard synchronous serial interface that allows 8 bits of data to be synchronously transmitted and received simultaneously, that is, full duplex. note that the spi pins are multiplexed with the port 2 pins (p2.0, p2.1, p2.2, and p2.3). these pins have spi functionality only if spe is set. otherwise, with spe cleared, standard port 2 functionality is maintained. spi can be configured for master or slave operation and typically consists of pins sclock, miso, mosi, and ss . sclock (serial clock i/o pin) pin 28 (mqfp package), pin 30 (csp package) the master clock (sclock) is used to synchronize the data transmitted and received through the mosi and miso data lines. a single data bit is transmitted and received in each sclock period. therefore, a byte is transmitted/received after eight sclock periods. the sclock pin is configured as an output in master mode and as an input in slave mode. in master mode, the bit rate, polarity, and phase of the clock are controlled by the cpol, cpha, spr0, and spr1 bits in the spicon sfr (see table 41). in slave mode, the spicon register must be configured with the same phase and polarity (cpha and cpol) as the master. the data is transmitted on one edge of the sclock signal and sampled on the other. miso (master in, slave out pin) pin 30 (mqfp package), pin 32 (csp package) the miso pin is configured as an input line in master mode and an output line in slave mode. the miso line on the master (data in) should be connected to the miso line in the slave device (data out). the data is transferred as byte-wide (8-bit) serial data, msb first. mosi (master out, slave in pin) pin 29 (mqfp package), pin31 (csp package) the mosi pin is configured as an output line in master mode and an input line in slave mode. the mosi line on the master (data out) should be connected to the mosi line in the slave device (data in). the data is transferred as byte-wide (8-bit) serial data, msb first. ss (slave select input pin) pin 31 (mqfp package), pin 33 (csp package) the ss pin is used only when the ADUC845/aduc847/ aduc848 are configured in spi slave mode. this line is active low. data is received or transmitted in slave mode only when the ss pin is low, allowing the parts to be used in single-master, multislave spi configurations. if cpha = 1, the ss input can be pulled low permanently. if cpha = 0, the ss input must be driven low before the first bit in a byte-wide transmission or reception and must return high again after the last bit in that byte-wide transmission or reception. in spi slave mode, the logic level on the external ss pin (pin 31/ pin 33) can be read via the spr0 bit in the spicon sfr. the sfr register in table 41 is used to control the spi interface.
ADUC845/aduc847/aduc848 rev. a | page 65 of 108 spiconspi control register sfr address: f8h power-on default: 05h bit addressable: yes table 41. spicon sfr bit designations bit no. name description 7 ispi spi interrupt bit. set by the microconverter at the end of each spi transfer. cleared directly by user code or indirectly by reading the spidat sfr. 6 wcol write collision error bit. set by the microconverter if spidat is written to while an spi transfer is in progress. cleared by user code. 5 spe spi interface enable bit. set by user code to enable spi functionality. cleared by user code to enable standard port 2 functionality. 4 spim spi master/slave mode select bit. set by user code to enable master mode operation (sclock is an output). cleared by user code to enable slave mode operation (sclock is an input). 3 cpol 1 clock polarity bit. set by user code to enable sclock idle high. cleared by user code to enable sclock idle low. 2 cpha 1 clock phase select bit. set by user code if the leading sc lock edge is to transmit data. cleared by user code if the trailing sclock edge is to transmit data. spi bit-rate bits. spr1 spr0 selected bit rate 0 0 f core /2 0 1 f core /4 1 0 f core /8 1, 0 spr1, spr0 1 1 f core /16 1 the cpol and cpha bits should both contain the same values for master and slave devices. note that both spi and i 2 c use the same isr (vector address 3bh); therefore, when using spi and i 2 c simultaneously, it is necessary to check the interfaces following an interrupt to determine which one caused the interrupt. spidat: spi data register sfr address: 7fh power-on default: 00h bit addressable: no
ADUC845/aduc847/aduc848 rev. a | page 66 of 108 using the spi interface depending on the configuration of the bits in the spicon sfr shown in table 41, the spi interface transmits or receives data in a number of possible modes. figure 46 shows all possible ADUC845/aduc847/aduc848 spi configurations and the timing relationships and synchronization among the signals involved. also shown in this figure is the spi interrupt bit (ispi) and how it is triggered at the end of each byte-wide communication. sclock (cpol = 1) sclock (cpol = 0) (cpha = 1) (cpha = 0) sample input ispi flag data output ispi flag sample input data output ? msb bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 lsb msb bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 lsb ss 04741-0-046 figure 46. spi timing, all modes spi interfacemaster mode in master mode, the sclock pin is always an output and generates a burst of eight clocks whenever user code writes to the spidat register. the sclock bit rate is determined by spr0 and spr1 in spicon. also note that the ss pin is not used in master mode. if the parts need to assert the ss pin on an external slave device, a port digital output pin should be used. in master mode, a byte transmission or reception is initiated by a byte write to spidat. the hardware automatically generates eight clock periods via the sclock pin, and the data is transmitted via mosi. with each sclock period, a data bit is also sampled via miso. after eight clocks, the transmitted byte is completely transmitted (via mosi), and the input byte (if required) is waiting in the input shift register (after being received via miso). the ispi flag is set automatically, and an interrupt occurs if enabled. the value in the input shift register is latched into spidat. spi interfaceslave mode in slave mode, the sclock is an input. the ss pin must also be driven low externally during the byte communication. trans- mission is also initiated by a write to spidat. in slave mode, a data bit is transmitted via miso, and a data bit is received via mosi through each input sclock period. after eight clocks, the transmitted byte is completely transmitted, and the input byte is waiting in the input shift register. the ispi flag is set automatically, and an interrupt occurs, if enabled. the value in the shift register is latched into spidat only when the trans- mission/reception of a byte has been completed. the end of transmission occurs after the eighth clock has been received if cpha = 1, or when ss returns high if cpha = 0.
ADUC845/aduc847/aduc848 rev. a | page 67 of 108 dual data pointers the parts incorporate two data pointers. the second data pointer is a shadow data pointer and is selected via the data pointer control sfr (dpcon). dpcon features automatic hardware post-increment and post-decrement as well as an automatic data pointer toggle. dpcondata pointer control sfr sfr address: a7h power-on default: 00h bit addressable: no table 42. dpcon sfr bit designations bit no. name description 7 ---- not implemented. write dont care. 6 dpt data pointer automatic toggle enable. cleared by the user to disable autoswapping of the dptr. set in user software to enable automatic toggling of the dptr after each movx or movc instruction. shadow data pointer mode. these bits enable extra modes of the shadow data pointer operation, allowing more compact and more effici ent code size and execution. dp1m1 dp1m0 behavior of the shadow data pointer 0 0 8052 behavior. 0 1 dptr is post-incremented after a movx or a movc instruction. 1 0 dptr is post-decremented after a movx or movc instruction. 5, 4 dp1m1, dp1m0 1 1 dptr lsb is toggled after a movx or movc inst ruction. (this instruction can be useful for moving 8-bit blocks to/from 16-bit devices.) main data pointer mode. these bits enable extra mode s of the main data pointer operation, allowing more compact and more efficient code size and execution. dp0m1 dp0m0 behavior of the main data pointer 0 0 8052 behavior. 0 1 dptr is post-incremented after a movx or a movc instruction. 1 0 dptr is post-decremented after a movx or movc instruction. 3, 2 dp0m1, dp0m0 1 1 dptr lsb is toggled after a movx or movc in struction. (this instruction is useful for moving 8-bit blocks to/from 16-bit devices.) 1 ---- not implemented. write dont care. 0 dpsel data pointer select. cleared by the user to select the main data pointer. th is means that the contents of this 24-bit register are placed into the dpl, dph, and dpp sfrs. set by the user to select the shadow data pointer. this means that the contents of a separate 24-bit register appear in the dpl, dph, and dpp sfrs. note the following: ? the dual data pointer section is the only place in which main and shadow data pointers are distinguished. whenever the dptr is mentioned elsewhere in this data sheet, active dptr is implied. ? only the movc/movx @dptr instructions automatically post-increment and post-decrement the dptr. other movc/movx instructions, such as movc pc or movc @ri, do not cause the dptr to automatically post-increment and post-decrement. to illustrate the operation of dpcon, the following code copies 256 bytes of code memory at address d000h into xram, starting from address 0000h. mov dptr,#0 ;main dptr = 0 mov dpcon,#55h ;select shadow dptr ;dptr1 increment mode ;dptr0 increment mode ;dptr auto toggling on mov dptr,#0d000h ;dptr = d000h moveloop: clr a movc a,@a+dptr ;get data ;post inc dptr ;swap to main dptr(data) movx @dptr,a ;put acc in xram ;increment main dptr ;swap shadow dptr(code) mov a, dpl jnz moveloop
ADUC845/aduc847/aduc848 rev. a | page 68 of 108 power supply monitor the power supply monitor, once enabled, monitors the dv dd and av dd supplies on the parts. it indicates when any of the supply pins drop below one of four user-selectable voltage trip points from 2.63 v to 4.63 v. for correct operation of the power supply monitor function, av dd must be equal to or greater than 2.63 v. monitor function is controlled via the psmcon sfr. if enabled via the ieip2 sfr, the monitor interrupts the core by using the psmi bit in the psmcon sfr. this bit is not cleared until the failing power supply returns above the trip point for at least 250 ms. the monitor function allows the user to save working registers to avoid possible data loss due to the low supply condition, and also ensures that normal code execution does not resume until a safe supply level is well established. the supply monitor is also protected against spurious glitches triggering the interrupt circuit. note that the 5 v part has an internal por trip level of 4.63 v, which means that there are no usable dv dd psm trip levels on the 5 v part. the 3 v part has a por trip level of 2.63 v following a reset and initialization sequence, allowing all relevant psm trip points to be used. psmconpower supply monitor control register sfr address: dfh power-on default: deh bit addressable: no table 43. psmcon sfr bit designations bit no. name description 7 cmpd dv dd comparator bit. this read-only bit directly reflects the state of the dv dd comparator. read 1 indicates that the dv dd supply is above its selected trip point. read 0 indicates that the dv dd supply is below its selected trip point. 6 cmpa av dd comparator bit. this read-only bit directly reflects the state of the av dd comparator. read 1 indicates that the av dd supply is above its selected trip point. read 0 indicates that the av dd supply is below its selected trip point. 5 psmi power supply monitor interrupt bit. set high by the microconverter if either cmpa or cmpd is low, indicating low analog or digital supply. the psmi bit can be used to interrupt the processor. once cm pd and/or cmpa returns (and remains) high, a 250 ms counter is started. when this counter times out, the psmi interrupt is cleared. psmi can also be written by the user. however, if either comparator output is low, it is not possible for the user to clear psmi. dv dd trip point selection bits. a 5 v part has no valid psm trip points. if the dv dd supply falls below the 4.63 v point, the part resets (por). for a 3 v part, all relevant psm trip points are valid. the 3 v por trip point is 2.63 v (fixed). these bits select the dv dd trip point voltage as follows: tpd1 tpd0 selected dv dd trip point (v) 0 0 4.63 0 1 3.08 1 0 2.93 4, 3 tpd1, tpd0 1 1 2.63 av dd trip point selection bits. these bits select the av dd trip point voltage as follows: tpa1 tpa0 selected av dd trip point (v) 0 0 4.63 0 1 3.08 1 0 2.93 2, 1 tpa1, tpa0 1 1 2.63 0 psmen power supply monitor enable bit. set to 1 by the user to enable the power supply monitor circuit. cleared to 0 by the user to disable the power supply monitor circuit.
ADUC845/aduc847/aduc848 rev. a | page 69 of 108 watchdog timer the watchdog timer generates a device reset or interrupt within a reasonable amount of time if the ADUC845/aduc847/ aduc848 enters an erroneous state, possibly due to a program- ming error or electrical noise. the watchdog function can be disabled by clearing the wde (watchdog enable) bit in the watchdog control (wdcon) sfr. when enabled, the watchdog circuit generates a system reset or interrupt (wds) if the user program fails to set the wde bit within a predetermined amount of time (see the pre30 bits in table 44). the watchdog timer is clocked from the 32 khz external crystal connected between the xtal1 and xtal2 pins. the wdcom sfr can be written only by user software if the double write sequence described in wdwr is initiated on every write access to the wdcon sfr. wdconwatchdog control register sfr address: c0h power-on default: 10h bit addressable: yes table 44. wdcon sfr bit designations bit no. name description watchdog timer prescale bits. the watchdog timeout period is given by the equation t wd = (2 pre (2 9 / f xtal )) (0 pre 7; f xtal = 32.768 khz) pre3 pre2 pre1 pre0 timeout period (ms) action 0 0 0 0 15.6 reset or interrupt 0 0 0 1 31.2 reset or interrupt 0 0 1 0 62.5 reset or interrupt 0 0 1 1 125 reset or interrupt 0 1 0 0 250 reset or interrupt 0 1 0 1 500 reset or interrupt 0 1 1 0 1000 reset or interrupt 0 1 1 1 2000 reset or interrupt 1 0 0 0 0.0 immediate reset 7, 6, 5, 4 pre3, pre2, pre1, pre0 pre3C0 > 1000b reserved. not a valid selection. 3 wdir watchdog interrupt response enable bit. if this bit is set by the user, the watchdog genera tes an interrupt response instead of a system reset when the watchdog timeout period expires. this in terrupt is not disabled by the clr ea instruction, and it is also a fixed, high priori ty interrupt. if the watchdog time r is not being used to monitor the system, it can be used alternatively as a timer. th e prescaler is used to set the timeout period in which an interrupt is generated. 2 wds watchdog status bit. set by the watchdog controller to indicate that a watchdog timeout has occurred. cleared by writing a 0 or by an external hardware reset. it is not cleared by a watchdog reset. 1 wde watchdog enable bit. set by the user to enable the watchdog and clear its counters. if this bit is not set by the user within the watchdog timeout period, the watchdog timer generates a reset or interrupt, depending on wdir. cleared under the following conditions: user writes 0; watchdog reset (wdir = 0); hardware reset; psm interrupt. 0 wdwr watchdog write enable bit. writing data to the wdcon sfr involves a double instruction sequence. global interrupts must first be disabled. the wdwr bit is set with the very next instruction, a write to the wdcon sfr. for example: clr ea ;disable interrupts while configuring to wdt setb wdwr ;allow write to wdcon mov wdcon, #72h ;enable wdt for 2.0s timeout setb ea ;enable interrupts again (if required)
ADUC845/aduc847/aduc848 rev. a | page 70 of 108 time interval counter (tic) a tic is provided on-chip for counting longer intervals than the standard 8051 compatible timers can count. the tic is capable of timeout intervals ranging from 1/128 second to 255 hours. also, this counter is clocked by the external 32.768 khz crystal rather than by the core clock, and it can remain active in power-down mode and time long power-down intervals. this has obvious applications for remote battery-powered sensors where regular widely spaced readings are required. note that instructions to the tic sfrs are also clocked at 32.768 khz, so sufficient time must be allowed in user code for these instructions to execute. six sfrs are associated with the time interval counter, timecon being its control register. depending on the configuration of the it0 and it1 bits in timecon, the selected time counter register overflow clocks the interval counter. when this counter is equal to the time interval value loaded in the intval sfr, the tii bit (timecon.2) is set and generates an interrupt, if enabled. if the part is in power-down mode, again with tic interrupt enabled, the tii bit wakes up the device and resumes code execution by vectoring directly to the tic interrupt service vector address at 0053h. the tic-related sfrs are described in table 45. note also that the time based sfrs can be written initially with the current time; the tic can then be controlled and accessed by user software. in effect, this facilitates the implementation of a real-time clock. a basic block diagram of the tic is shown in figure 47. because the tic is clocked directly from a 32 khz external crystal on the parts, instructions that access the tic registers are also clocked at 32 khz (not at the core frequency). the user must ensure that sufficient time is given for these instructions to execute. 8-bit prescaler hundredths counter hthsec second counter sec minute counter min hour counter hour tien interval timeout time interval counter interrupt 8-bit interval counter intval sfr interval timebase selection mux tcen 32.768khz external crystal its0 its1 equal? 04741-0-047 figure 47. tic simplified block diagram
ADUC845/aduc847/aduc848 rev. a | page 71 of 108 timecontic control register sfr address: a1h power-on default: 00h bit addressable: no table 45. timecon sfr bit designations bit no. name description 7 ---- not implemented. write dont care. 6 tfh twenty-four hour select bit. set by the user to enable the hour counter to count from 0 to 23. cleared by the user to enable the ho ur counter to count from 0 to 255. 5, 4 its1, its0 interval timebase selection bits. its1 its0 interval timebase 0 0 1/128 second 0 1 seconds 1 0 minutes 1 1 hours 3 st1 single time interval bit. set by the user to generate a single interval t imeout. if set, a timeout clears the tien bit. cleared by the user to allow the interval counter to be automatically reloaded and start counting again at each interval timeout. 2 tii tic interrupt bit. set when the 8-bit interval counter matches the value in the intval sfr. cleared by user software. 1 tien time interval enable bit. set by the user to enable the 8-bit time interval counter. cleared by the user to disable the interval counter. 0 tcen time clock enable bit. set by the user to enable the time clock to the time interval counters. cleared by the user to disable the clock to the time interv al counters and reset the time interval sfrs to the last value written to them by the user. the time registers (hth sec, sec, min, and hour) can be written while tcen is low.
ADUC845/aduc847/aduc848 rev. a | page 72 of 108 intvaluser timer interval select register function: user code writes the required time interval to this register. when the 8-bit interval counter is equal to the time interval value loaded in the intval sfr, the tii bit (timecon.2) is set and generates an interrupt, if enabled. sfr address: a6h power-on default: 00h bit addressable: no valid value: 0 to 255 decimal hthsechundredths of seconds time register function: this register is incremented in 1/128-second intervals once tcen in timecon is active. the hthsec sfr counts from 0 to 127 before rolling over to increment the sec time register. sfr address: a2h power-on default: 00h bit addressable: no valid value: 0 to 127 decimal secseconds time register function: this register is incremented in 1-second intervals once tcen in timecon is active. the sec sfr counts from 0 to 59 before rolling over to increment the min time register. sfr address: a3h power-on default: 00h bit addressable: no valid value: 0 to 59 decimal minminutes time register function this register is incremented in 1-minute intervals once tcen in timecon is active. the min sfr counts from 0 to 59 before rolling over to increment the hour time register. sfr address: a4h power-on default: 00h bit addressable: no valid value: 0 to 59 decimal hourhours time register function: this register is incremented in 1-hour intervals once tcen in timecon is active. the hour sfr counts from 0 to 23 before rolling over to 0. sfr address: a5h power-on default: 00h bit addressable: no valid value: 0 to 23 decimal to enable the tic as a real-time clock, the hour, min, sec, and hthsec registers can be loaded with the current time. once the tcen bit is high, the tic starts. to use the tic as a time interval counter, select the count intervalhundredths of seconds, s econds, minutes, and hours via the its0 and its1 bits in the time con sfr. load the count required into the intval sfr. note that intval is only an 8-bit register, so user software must take into account any intervals longer than are possible with 8 bits. therefore, to count an interval of 20 seconds, use the following procedure: mov timecon, #0d0h ;enable 24hour mode, count seconds, clear tcen. mov intval, #14h ;load intval with required count interval...in this case 14h = 20 mov timecon, #0d3h ;start tic counting and enable the 8bit intval counter.
ADUC845/aduc847/aduc848 rev. a | page 73 of 108 8052 compatible on-chip peripherals this section gives a brief overview of the various secondary peripheral circuits that are available to the user on-chip. these features are mostly 8052 compatible (with a few additional features) and are controlled via st andard 8052 sfr bit definitions. parallel i/o the ADUC845/aduc847/ aduc848 use four input/output ports to exchange data with external devices. in addition to performing general-purpose i/o, some are capable of external memory operations, while others are multiplexed with alternate functions for the peripheral functions available on-chip. in general, when a peripheral is enabled, that pin cannot be used as a general-purpose i/o pin. port 0 port 0 is an 8-bit open-drain bidirectional i/o port that is directly controlled via the port 0 sfr (80h). port 0 is also the multiplexed low-order address and data bus during accesses to external data memory. figure 48 shows a typical bit latch and i/o buffer for a port 0 pin. the bit latch (one bit in the ports sfr) is represented as a type d flip-flop, which clocks in a value from the internal bus in response to a write to latch signal from the cpu. the q output of the flip-flop is placed on the internal bus in response to a read latch signal from the cpu. the level of the port pin itself is placed on the internal bus in response to a read pin signal from the cpu. some instructions that read a port activate the read latch signal, and others activate the read pin signal. see the read-modify-write instructions section for details. control read latch internal bus write to latch read pin d cl q q latch dv dd addr/data p0.x pin 04741-0-048 figure 48. port 0 bit latch and i/o buffer as shown in figure 48, the output drivers of port 0 pins are switchable to an internal addr and addr/data bus by an internal control signal for use in external memory accesses. during external memory accesses, the p0 sfr has 1s written to it; therefore, all its bit latches become 1. when accessing external memory, the control signal in figure 48 goes high, enabling push-pull operation of the output pin from the internal address or data bus (addr/data line). therefore, no external pull-ups are required on port 0 for it to access external memory. in general-purpose i/o port mode, port 0 pins that have 1s written to them via the port 0 sfr are configured as open-drain and, therefore, float. in this state, port 0 pins can be used as high impedance inputs. this is represented in figure 48 by the nand gate whose output remains high as long as the control signal is low, thereby disabling the top fet. external pull-up resistors are, therefore, required when port 0 pins are used as general- purpose outputs. port 0 pins with 0s written to them drive a logic low output voltage (v ol ) and are capable of sinking 1.6 ma. port 1 port 1 is also an 8-bit port directly controlled via the p1 sfr (90h). port 1 digital output capability is not supported on this device. port 1 pins can be configured as digital inputs or analog inputs. by (power-on) default, these pins are configured as analog inputs, that is, 1 is written to the corresponding port 1 register bit. to configure any of these pins as digital inputs, the user should write a 0 to these port bits to configure the corre- sponding pin as a high impedance digital input. these pins also have various secondary functions aside from their analog input capability, as described in table 46. table 46. port 1 alternate functions pin no. alternate function p1.2 refin2+ (second reference input, +ve) p1.3 refin2? (second reference input, Cve) p1.6 iexc1 (200 a excitation current source) p1.7 iexc2 (200 a excitation current source) read latch internal bus write to latch read pin d cl q q latch p1.x pin to adc 04741-0-068 figure 49. port 1 bit latch and i/o buffer port 2 port 2 is a bidirectional port with internal pull-up resistors directly controlled via the p2 sfr. port 2 also emits the middle- and high-order address bytes during accesses to the 24-bit external data memory space. in general-purpose i/o port mode, port 2 pins that have 1s written to them are pulled high by the internal pull-ups as shown in figure 50 and, in that state, can be used as inputs. as inputs, port 2 pins pulled externally low source current because of the internal pull-up resistors. port 2 pins with 0s written to them drive a logic low output voltage (v ol ) and are capable of sinking 1.6 ma.
ADUC845/aduc847/aduc848 rev. a | page 74 of 108 p2.5 and p2.6 can also be used as pwm outputs, while p2.7 can act as an alternate pwm clock source. when selected as the pwm outputs, they overwrite anything written to p2.5 or p2.6. table 47. port 2 alternate functions pin no. alternate function p2.0 sclock for spi p2.1 mosi for spi p2.2 miso for spi p2.3 ss and t2 clock input p2.4 t2ex alternate control for t2 p2.5 pwm0 output p2.6 pwm1 output p2.7 pwmclk control read latch internal bus write to latch read pin d cl q latch dv dd addr p2.x pin dv dd internal pull-up q 04741-0-069 figure 50. port 2 bit latch and i/o buffer port 3 port 3 is a bidirectional port with internal pull-ups directly controlled via the p3 sfr (b0h). port 3 pins that have 1s written to them are pulled high by the internal pull-ups and, in that state, can be used as inputs. as inputs, port 3 pins pulled externally low source current because of the internal pull-ups. port 3 pins with 0s written to them drive a logic low output voltage (v ol ) and are capable of sinking 4 ma. port 3 pins also have various secondary functions as described in table 48. the alternate functions of port 3 pins can be activated only if the corresponding bit latch in the p3 sfr contains a 1. otherwise, the port pin remains at 0. table 48. port 3 alternate functions pin no. alternate function p3.0 rxd (uart input pin, or serial data i/o in mode 0) p3.1 txd (uart output pin, or serial clock output in mode 0) p3.2 int0 (external interrupt 0) p3.3 int1 (external interrupt 1) p3.4 t0 (timer/counter 0 external input) p3.5 t1 (timer/counter 1 external input) p3.6 wr (external data memory write strobe) p3.7 rd (external data memory read strobe) read latch internal bus write to latch read pin d cl q latch dv dd p3.x pin internal pull-up alternate output function alternate input function q 04741-0-071 figure 51. port 3 bit latch and i/o buffer read-modify-write instructions some 8051 instructions read the latch while others read the pin. the instructions that read the latch rather than the pins are the ones that read a value, possibly change it, and rewrite it to the latch. these are called read-modify-write instructions, which are listed in table 49. when the destination operand is a port or a port bit, these instructions read the latch rather than the pin. table 49. read-modify-write instructions instruction description anl logical and, for example, anl p1, a orl logical or, for example, orl p2, a xrl logical ex-or, for example, xrl p3, a jbc jump if bit = 1 and clear bit, for example, jbc p1.1, label cpl complement bit, for example, cpl p3.0 inc increment, for example, inc p2 dec decrement, for example, dec p2 djnz decrement and jump if not zero, for example, djnz p3, label mov px.y, c 1 move carry to bit y of port x clr px.y 1 clear bit y of port x setb px.y 1 set bit y of port x ___________________________________________ 1 these instructions read the port byte (all 8 bits), modify the addressed bit, and write the new byte back to the latch. read-modify-write instructions are directed to the latch rather than to the pin to avoid a possible misinterpretation of the voltage level of a pin. for example, a port pin might be used to drive the base of a transistor. when 1 is written to the bit, the transistor is turned on. if the cpu reads the same port bit at the pin rather than the latch, it reads the base voltage of the transistor and interprets it as logic 0. reading the latch rather than the pin returns the correct value of 1.
ADUC845/aduc847/aduc848 rev. a | page 75 of 108 timers/counters the ADUC845/aduc847/ aduc848 have three 16-bit timer/ counters: timer 0, timer 1, and timer 2. the timer/counter hardware is included on-chip to relieve the processor core of the overhead inherent in implementing timer/counter functionality in software. each timer/counter consists of two 8-bit registers: thx and tlx (x = 0, 1, or 2). all three can be configured to operate either as timers or as event counters. when functioning as a timer, the tlx register is incremented every machine cycle. thus, one can think of it as counting machine cycles. because a machine cycle on a single-cycle core consists of one core clock period, the maximum count rate is the core clock frequency. when functioning as a counter, the tlx register is incremented by a 1-to-0 transition at its corresponding external input pin: t0, t1, or t2. when the samples show a high in one cycle and a low in the next cycle, the count is incremented. because it takes two machine cycles (two core clock periods) to recognize a 1-to-0 transition, the maximum count rate is half the core clock frequency. there are no restrictions on the duty cycle of the external input signal, but, to ensure that a given level is sampled at least once before it changes, it must be held for a minimum of one full machine cycle. user configuration and control of all timer operating modes is achieved via three sfrs: tmod, tcon control and configuration for timers 0 and 1. t2con control and configuration for timer 2. tmodtimer/counter 0 and 1 mode register sfr address: 89h power-on default: 00h bit addressable: no table 50. tmod sfr bit designation bit no. name description 7 gate timer 1 gating control. set by software to enable timer/counter 1 only while the int1 pin is high and the tr1 control is set. cleared by software to enable timer 1 whenever the tr1control bit is set. 6 c/t timer 1 timer or counter select bit. set by software to select counter operation (input from t1 pin). cleared by software to select the timer ope ration (input from internal system clock). timer 1 mode select bits m1 m0 description 0 0 th1 operates as an 8-bit timer/coun ter. tl1 serves as 5-bit prescaler. 0 1 16-bit timer/counter. th1 and tl1 are cascaded; there is no prescaler. 1 0 8-bit autoreload timer/counter. th1 holds a value th at is to be reloaded into tl1 each time it overflows. 5, 4 m1, m0 1 1 timer/counter 1 stopped. 3 gate timer 0 gating control. set by software to enable timer/counter 0 only while the int0 pin is high and the tr0 control bit is set. cleared by software to enable timer 0 whenever the tr0 control bit is set. 2 c/t timer 0 timer or counter select bit. set by software to the select counter operation (input from t0 pin). cleared by software to the select timer operation (input from internal system clock). timer 0 mode select bits m1 m0 description 0 0 th0 operates as an 8-bit timer/counter. tl0 serves as a 5-bit prescaler. 0 1 16-bit timer/counter. th0 and tl0 are cascaded; there is no prescaler. 1 0 8-bit autoreload timer/counter. th0 holds a value th at is to be reloaded into tl0 each time it overflows. 1, 0 m1, m0 1 1 tl0 is an 8-bit timer/counter controlled by the standard timer 0 control bits. th0 is an 8-bit timer only, controlled by timer 1 control bits.
ADUC845/aduc847/aduc848 rev. a | page 76 of 108 tcontimer/counter 0 and 1 control register sfr address: 88h power-on default: 00h bit addressable: yes table 51. tcon sfr bit designations bit no. name description 7 tf1 timer 1 overflow flag. set by hardware on a timer/counter 1 overflow. cleared by hardware when the program counter (pc) vectors to the interrupt service routine. 6 tr1 timer 1 run control bit. set by the user to turn on timer/counter 1. cleared by the user to turn off timer/counter 1. 5 tf0 timer 0 overflow flag. set by hardware on a timer/counter 0 overflow. cleared by hardware when the pc vectors to the interrupt service routine. 4 tr0 timer 0 run control bit. set by the user to turn on timer/counter 0. cleared by the user to turn off timer/counter 0. 3 ie1 1 external interrupt 1 (int1 ) flag. set by hardware by a falling edge or by a zero level applied to the external interrupt pin, int1 , depending on the state of bit it1. cleared by hardware when the pc vectors to the interrup t service routine only if the interrupt was transition- activated. if level-activated, the external requesting source controls the request flag rather than the on-chip hardware. 2 it1 1 external interrupt 1 (ie1) trigger type. set by software to specify edge-sensitive detection, that is, 1-to-0 transition. cleared by software to specify level-sensitive detection, that is, zero level. 1 ie0 1 external interrupt 0 (int0 ) flag. set by hardware by a falling edge or by a zero le vel being applied to the external interrupt pin, int0 , depending on the statue of bit it0. cleared by hardware when the pc vectors to the interrup t service routine only if the interrupt was transition- activated. if level-activated, the external requesting source controls the request flag rather than the on-chip hardware. 0 it0 1 external interrupt 0 (ie0) trigger type. set by software to specify edge-sensitive detection, that is, 1-to-0 transition. cleared by software to specify level-sensitive detection, that is, zero level. ___________________________________________ 1 these bits are not used to control timer/counters 0 and 1, but are used instead to control and monitor the external int0 and int1 interrupt pins. timer/counter 0 and 1 data registers each timer consists of two 8-bit registers. these can be used as independent registers or combined into a single 16-bit registe r, depending on the timers mode configuration. th0 and tl0 timer 0 high and low bytes. sfr address: 8ch and 8ah, respectively. power-on default: 00h and 00h, respectively. th1 and tl1 timer 1 high and low bytes. sfr address: 8dh and 8bh, respectively. power-on default: 00h and 00h, respectively
ADUC845/aduc847/aduc848 rev. a | page 77 of 108 timer/counter 0 and 1 operating modes this section describes the operating modes for timer/counters 0 and 1. unless otherwise noted, these modes of operation are the same for both timer 0 and timer 1. mode 0 (13-bit timer/counter) mode 0 configures an 8-bit timer/counter. figure 52 shows mode 0 operation. note that the divide-by-12 prescaler is not present on the single-cycle core. 04741-0-049 core clk* control p3.4/t0 gate p3.2/in t0 tr0 tf0 tl0 (5 bits) th0 (8 bits) interrupt c/t = 0 c/t = 1 * the core clock is the output of the pll (see the on-chip pll section) figure 52. timer/counter 0, mode 0 in this mode, the timer register is configured as a 13-bit register. as the count rolls over from all 1s to all 0s, it sets the timer overflow flag, tf0. tf0 can then be used to request an interrupt. the counted input is enabled to the timer when tr0 = 1 and either gate = 0 or int0 = 1. setting gate = 1 allows the timer to be controlled by external input int0 to facilitate pulse-width measurements. tr0 is a control bit in the special function register tcon; gate is in tmod. the 13-bit register consists of all 8 bits of th0 and the lower 5 bits of tl0. the upper 3 bits of tl0 are indeterminate and should be ignored. setting the run flag (tr0) does not clear the registers. mode 1 (16-bit timer/counter) mode 1 is the same as mode 0 except that the mode 1 timer register runs with all 16 bits. mode 1 is shown in figure 53. core clk* control p3.4/t0 gate tr0 tf0 tl0 (8 bits) th0 (8 bits) interrupt 04741-0-050 * the core clock is the output of the pll (see the on-chip pll section) 0 p3.2/int c/ t = 0 c/ t = 1 figure 53. timer/counter 0, mode 1 mode 2 (8-bit timer/counter with autoreload) mode 2 configures the timer register as an 8-bit counter (tl0) with automatic reload as shown in figure 54. overflow from tl0 not only sets tf0, but also reloads tl0 with the contents of th0, which is preset by software. the reload leaves th0 unchanged. control tf0 tl0 (8 bits) interrupt reload th0 (8 bits) core clk* p3.4/t0 gate tr0 0 04741-0-051 * the core clock is the output of the pll (see the on-chip pll section) p3.2/int c/t = 0 c/t = 1 figure 54. timer/counter 0, mode 2 mode 3 (two 8-bit timer/counters) mode 3 has different effects on timer 0 and timer 1. timer 1 in mode 3 simply holds its count. the effect is the same as setting tr1 = 0. timer 0 in mode 3 establishes tl0 and th0 as two separate counters. this configuration is shown in figure 55. tl0 uses the timer 0 control bits c/ t , gate, tr0, int0 , and tf0. th0 is locked into a timer function (counting machine cycles) and takes over the use of tr1 and tf1 from timer 1. therefore, th0 then controls the timer 1 interrupt. mode 3 is provided for applications requiring an extra 8-bit timer or counter. when timer 0 is in mode 3, timer 1 can be turned on and off by switching it out of and into its own mode 3, or it can still be used by the serial interface as a baud rate generator. in fact, it can be used in any application not requiring an interrupt from timer 1 itself. control core clk/12 tf0 tl0 (8 bits) interrupt core clk* p3.4/t0 gate tr0 tf1 th0 (8 bits) interrupt core clk/12 tr1 04741-0-052 * the core clock is the output of the pll (see the on-chip pll section) 0 p3.2/int c/t = 0 c/t = 1 figure 55. timer/counter 0, mode 3
ADUC845/aduc847/aduc848 rev. a | page 78 of 108 t2contimer/counter 2 control register sfr address: c8h power-on default: 00h bit addressable: yes table 52. t2con sfr bit designations bit no. name description 7 tf2 timer 2 overflow flag. set by hardware on a timer 2 overflow. tf2 cannot be set when either rclk = 1 or tclk = 1. cleared by user software. 6 exf2 timer 2 external flag. set by hardware when either a capture or reload is ca used by a negative transition on t2ex and exen2 = 1. cleared by user software. 5 rclk receive clock enable bit. set by the user to enable the serial port to use timer 2 overflow pulses for its receive clock in serial port modes 1 and 3. cleared by the user to enable timer 1 overflow to be used for the receive clock. 4 tclk transmit clock enable bit. set by the user to enable the se rial port to use timer 2 overflow pulses for its transmit clock in serial port modes 1 and 3. cleared by the user to enable timer 1 over flow to be used for the transmit clock. 3 exen2 timer 2 external enable flag. set by the user to enable a capture or reload to occur as a re sult of a negative transition on t2ex if timer 2 is not being used to clock the serial port. cleared by the user for timer 2 to ignore events at t2ex. 2 tr2 timer 2 start/stop control bit. set by the user to start timer 2. cleared by the user to stop timer 2. 1 cnt2 timer 2 timer or counter function select bit. set by the user to select the counter function (input from external t2 pin). cleared by the user to select the timer function (input from on-chip core clock). 0 cap2 timer 2 capture/reload select bit. set by the user to enable captures on ne gative transitions at t2ex if exen2 = 1. cleared by the user to enable autoreloads with timer 2 ov erflows or negative transitions at t2ex when exen2 = 1. when either rclk = 1 or tclk = 1, this bit is ignored an d the timer is forced to autoreload on timer 2 overflow. timer/counter 2 data registers timer/counter 2 also has two pairs of 8-bit data registers associated with it. these are used as both timer data registers and as timer capture/reload registers. th2 and tl2 timer 2 data high byte and low byte. sfr address: cdh and cch respectively. power-on default: 00h and 00h, respectively. rcap2h and rcap2l timer 2 capture/reload byte and low byte. sfr address: cbh and cah, respectively. power-on default: 00h and 00h, respectively.
ADUC845/aduc847/aduc848 rev. a | page 79 of 108 timer/counter 2 operating modes the following sections describe the operating modes for timer/counter 2. the operating modes are selected by bits in the t2con sfr as shown in table 53. table 53. t2con operating modes rclk (or) tclk cap2 tr2 mode 0 0 1 16-bit autoreload 0 1 1 16-bit capture 1 x 1 baud rate x x 0 off 16-bit autoreload mode autoreload mode has two options that are selected by bit exen2 in t2con. if exen2 = 0, when timer 2 rolls over, it not only sets tf2 but also causes the timer 2 registers to be reloaded with the 16-bit value in registers rcap2l and rcap2h, which are preset by software. if exen2 = 1, timer 2 still performs the above, but with the added feature that a 1-to-0 transition at external input t2ex also triggers the 16-bit reload and sets exf2. autoreload mode is shown in figure 56. 16-bit capture mode capture mode has two options that are selected by bit exen2 in t2con. if exen2 = 0, timer 2 is a 16-bit timer or counter that, upon overflowing, sets bit tf2, the timer 2 overflow bit, which can be used to generate an interrupt. if exen2 = 1, timer 2 still performs the above, but a l-to-0 transition on external input t2ex causes the current value in the timer 2 registers, tl2 and th2, to be captured into registers rcap2l and rcap2h, respectively. in addition, the transition at t2ex causes bit exf2 in t2con to be set, and exf2, like tf2, can generate an interrupt. capture mode is shown in figure 57. the baud rate generator mode is selected by rclk = 1 and/or tclk = 1. in either case, if timer 2 is used to generate the baud rate, the tf2 interrupt flag does not occur. therefore, timer 2 interrupts do not occur, so they do not have to be disabled. in this mode, the exf2 flag can, however, still cause interrupts, which can be used as a third external interrupt. baud rate generation is described as part of the uart serial port operation in the following section. core clk* t2 pin tr2 control tl2 (8 bits) th2 (8 bits) reload tf2 exf2 timer interrupt exen2 control transition detector t2ex pin rcap2l rcap2h * the core clock is the output of the pll (see the on-chip pll section) 04741-0-053 c/ t2 = 0 c/ t2 = 1 figure 56. timer/counter 2, 16-bit autoreload mode tf2 core clk* t2 pin tr2 control tl2 (8 bits) th2 (8 bits) capture exf2 timer interrupt exen2 control transition detector t2ex pin rcap2l rcap2h * the core clock is the output of the pll (see the on-chip pll section) 04741-0-054 c/ t2 = 0 c/ t2 = 1 figure 57. timer/counter 2, 16-bit capture mode
ADUC845/aduc847/aduc848 rev. a | page 80 of 108 uart serial interface the serial port is full duplex, meaning that it can transmit and receive simultaneously. it is also receive buffered, meaning that it can begin receiving a second byte before a previously received byte is read from the receive register. however, if the first byte is still not read by the time receptio n of the second byte is complete, the first byte is lost. the physical interface to the serial data network is via pins rxd(p3.0) and txd(p3.1), while the sfr interface to the uart comprises sbuf and scon, as described below. sbuf sfr both the serial port receive and transmit registers are accessed through the sbuf sfr (sfr address = 99h). writing to sbuf loads the transmit register, and reading sbuf accesses a physically separate receive register. scon uartserial port control register sfr address: 98h power-on default: 00h bit addressable: yes table 54. scon sfr bit designations bit no. name description uart serial mode select bits. these bits select the serial port operating mode as follows: sm0 sm1 selected operating mode. 0 0 mode 0: shift register, fixed baud rate (core_clk/2). 0 1 mode 1: 8-bit uart, variable baud rate. 1 0 mode 2: 9-bit uart, fixed baud rate (core_clk/32) or (core_clk/16). 7, 6 sm0, sm1 1 1 mode 3: 9-bit uart, variable baud rate. 5 sm2 multiprocessor communication enable bit. enables multiprocessor communication in modes 2 and 3. in mode 0, sm2 should be cleared. in mode 1, if sm2 is set, ri is not activated if a valid stop bit was not received. if sm2 is cl eared, ri is set as soon as the byte of data is received. in modes 2 or 3, if sm2 is set, ri is not activa ted if the received ninth data bit in rb8 is 0. if sm2 is cleared, ri is set as soon as the byte of data is received. 4 ren serial port receive enable bit. set by user software to enable serial port reception. 3 tb8 serial port transmit (bit 9). the data loaded into tb8 is the ninth data bit transmitted in modes 2 and 3. cleared by user software to disable serial port reception. 2 rb8 serial port receiver bit 9. the ninth data bit received in modes 2 and 3 is latched in to rb8. for mode 1, the stop bit is latched into rb8. 1 ti serial port transmit interrupt flag. set by hardware at the end of the eighth bit in mode 0, or at the beginning of the stop bit in modes 1, 2, and 3. ti must be cleared by user software. 0 ri serial port receive interrupt flag. set by hardware at the end of the eighth bit in mode 0, or halfway through the stop bit in modes 1, 2, and 3. ri must be cleared by software. sbufuart serial port data register sfr address: 99h power-on default: 00h bit addressable: no
ADUC845/aduc847/aduc848 rev. a | page 81 of 108 mode 0 (8-bit shift register mode) mode 0 is selected by clearing both the sm0 and sm1 bits in the sfr scon. serial data enters and exits through rxd. txd outputs the shift clock. eight data bits are transmitted or received. transmission is initiated by any instruction that writes to sbuf. the data is shifted out of the rxd line. the 8 bits are transmitted with the least significant bit (lsb) first. reception is initiated when the receive enable bit (ren) is 1 and the receive interrupt bit (ri) is 0. when ri is cleared, the data is clocked into the rxd line, and the clock pulses are output from the txd line as shown in figure 58. rxd (data out) txd (shift clock) data bit 0 data bit 1 data bit 6 data bit 7 04741-0-055 figure 58. 8-bit shift register mode mode 1 (8-bit uart, variable baud rate) mode 1 is selected by clearing sm0 and setting sm1. each data byte (lsb first) is preceded by a start bit (0) and followed by a stop bit (1). therefore, 10 bits are transmitted on txd or are received on rxd. the baud rate is set by the timer 1 or timer 2 overflow rate, or a combination of the two (one for transmission and the other for reception). transmission is initiated by writing to sbuf. the write to sbuf signal also loads a 1 (stop bit) into the 9th bit position of the transmit shift register. the data is output bit-by-bit until the stop bit appears on txd and the transmit interrupt flag (ti) is automatically set as shown in figure 59. txd ti (scon.1) start bit d0 d1 d2 d3 d4 d5 d6 d7 stop bit set interrupt i.e., ready for more data 04741-0-056 figure 59. 8-bit variable baud rate reception is initiated when a 1-to-0 transition is detected on rxd. assuming that a valid start bit is detected, character reception continues. the start bit is skipped and the 8 data bits are clocked into the serial port shift register. when all 8 bits have been clocked in, the following events occur: ? the 8 bits in the receive shift register are latched into sbuf. ? the 9th bit (stop bit) is clocked into rb8 in scon. ? the receiver interrupt flag (ri) is set. all of the following conditions must be met at the time the final shift pulse is generated: ? ri = 0 ? either sm2 = 0 or sm2 = 1 ? received stop bit = 1 if any of these conditions is not met, the received frame is irretrievably lost, and ri is not set. mode 2 (9-bit uart with fixed baud rate) mode 2 is selected by setting sm0 and clearing sm1. in this mode, the uart operates in 9-bit mode with a fixed baud rate. the baud rate is fixed at core_clk/64 by default, although by setting the smod bit in pcon, the frequency can be doubled to core_clk/32. eleven bits are transmitted or received: a start bit (0), 8 data bits, a programmable 9th bit, and a stop bit (1). the 9th bit is most often used as a parity bit, although it can be used for anything, including a ninth data bit if required. to transmit, the 8 data bits must be written into sbuf. the ninth bit must be written to tb8 in scon. when transmission is initiated, the 8 data bits (from sbuf) are loaded into the transmit shift register (lsb first). the contents of tb8 are loaded into the 9th bit position of the transmit shift register. the transmission starts at the next valid baud rate clock. the ti flag is set as soon as the stop bit appears on txd. reception for mode 2 is similar to that of mode 1. the 8 data bytes are input at rxd (lsb first) and loaded onto the receive shift register. when all 8 bits have been clocked in, the following events occur: ? the 8 bits in the receive shift register are latched into sbuf. ? the 9th data bit is latched into rb8 in scon. ? the receiver interrupt flag (ri) is set. all of the following conditions must be met at the time the final shift pulse is generated: ? ri = 0 ? either sm2 = 0 or sm2 = 1 ? received stop bit = 1 if any of these conditions is not met, the received frame is irretrievably lost, and ri is not set.
ADUC845/aduc847/aduc848 rev. a | page 82 of 108 mode 3 (9-bit uart with variable baud rate) mode 3 is selected by setting both sm0 and sm1. in this mode, the 8051 uart serial port operates in 9-bit mode with a variable baud rate determined by either timer 1 or timer 2. the opera- tion of the 9-bit uart is the same as for mode 2, but the baud rate can be varied as for mode 1. in all four modes, transmission is initiated by any instruction that uses sbuf as a destination register. reception is initiated in mode 0 when ri = 0 and ren = 1. reception is initiated in the other modes by the incoming start bit if ren = 1. uart serial port baud rate generation mode 0 baud rate generation the baud rate in mode 0 is fixed: mode 0 baud rate = ? ? ? ? ? ? 12 frequency clock core mode 2 baud rate generation the baud rate in mode 2 depends on the value of the smod bit in the pcon sfr. if smod = 0, the baud rate is 1/32 of the core clock. if smod = 1, the baud rate is 1/16 of the core clock: mode 2 baud rate = 32 2 smod core clock frequency modes 1 and 3 baud rate generation the baud rates in modes 1 and 3 are determined by the overflow rate in timer 1 or timer 2, or in both (one for transmit and the other for receive). timer 1 generated baud rates when timer 1 is used as the baud rate generator, the baud rates in modes 1 and 3 are determined by the timer 1 overflow rate and the value of smod as follows: modes 1 and 3 baud rate = 32 2 smod timer 1 overflow rate the timer 1 interrupt should be disabled in this application. the timer itself can be configured for either timer or counter operation, and in any of its three running modes. in the most typical application, it is configured for timer operation in autoreload mode (high nibble of tmod = 0010 binary). in that case, the baud rate is given by the formula modes 1 and 3 baud rate = ) 256 ( 32 2 th1 frequency clock core smod ? timer 2 generated baud rates baud rates can also be generated by using timer 2. using timer 2 is similar to using timer 1 in that the timer must overflow 16 times before a bit is transmitted or received. because timer 2 has a 16-bit autoreload mode, a wider range of baud rates is possible. modes 1 and 3 baud rate = 16 1 timer 2 overflow rate therefore, when timer 2 is used to generate baud rates, the timer increments every two clock cycles rather than every core machine cycle as before. it increments six times faster than timer 1, and, therefore, baud rates six times faster are possible. because timer 2 has 16-bit autoreload capability, very low baud rates are still possible. timer 2 is selected as the baud rate generator by setting the tclk and/or rclk in t2con. the baud rates for transmit and receive can be simultaneously different. setting rclk and/or tclk puts timer 2 into its baud rate generator mode as shown in figure 60. in this case, the baud rate is given by the formula modes 1 and 3 baud rate = () [] () l rcap h rcap frequency clock core 2 : 2 65536 16 ? core clk* t2 pin tr2 control tl2 (8 bits) th2 (8 bits) reload exen2 control t2ex pin transition detector exf 2 timer 2 interrupt note: availability of additiona l external interrup t rcap2l rcap2h timer 2 overflow 2 16 16 rclk tclk rx clock tx clock 0 0 1 1 1 0 smod timer 1 overflow c/ t2 = 0 c/ t2 = 1 * the core clock is the output of the pll (see the on-chip pll section) 04741-0-057 figure 60. timer 2, uart baud rates
ADUC845/aduc847/aduc848 rev. a | page 83 of 108 timer 3 generated baud rates the high integer dividers in a uart block mean that high speed baud rates are not always possible. also, generating baud rates requires the exclusive use of a timer, rendering it unusable for other applications when the uart is required. to address this problem, the ADUC845/aduc847/aduc848 have a dedicated baud rate timer (timer 3) specifically for generating highly accurate baud rates. timer 3 can be used instead of timer 1 or timer 2 for generating very accurate high speed uart baud rates including 115200 and 230400. timer 3 also allows a much wider range of baud rates to be obtained. in fact, every desired bit rate from 12 bps to 393216 bps can be generated to within an error of 0.8%. timer 3 also frees up the other three timers, allowing them to be used for different applications. a block diagram of timer 3 is shown in figure 61. (1 + t3fd/64) t3 rx/tx clock core clk t3en rx clock tx clock timer 1/timer 2 rx clock fractiona l divider 0 0 1 1 timer 1/timer 2 tx clock 16 2 div 04741-0-058 figure 61. timer 3, uart baud rate two sfrs (t3con and t3fd) are used to control timer 3. t3con is the baud rate control sfr, allowing timer 3 to be used to set up the uart baud rate, and to set up the binary divider (div). the appropriate value to write to the div2-1-0 bits can be calculated using the following formula where f core is defined in pllcon sfr. note that the div value must be rounded down. div = ) 2 ( log 16 log ? ? ? ? ? ? ? ? rate baud frequency clock core t3fd is the fractional divider ratio required to achieve the required baud rate. the appropriate value for t3fd can be calculated with the following formula: t3fd = rate baud frequency clock core div ? 1 2 2 ? 64 note that t3fd should be rounded to the nearest integer. once the values for div and t3fd are calculated, the actual baud rate can be calculated with the following formula: actual baud rate = ) 64 ( 2 2 1 + ? t3fd frequency clock core div for example, to get a baud rate of 9600 while operating at a core clock frequency of 1.5725 mhz, that is, cd = 3, div = log(1572500/(16 9600))/log2 = 3.35 = 3 note that the div result is rounded down. t3fd = (2 1572500)/(2 3?1 9600) ? 64 = 18 = 12h therefore, the actual baud rate is 9588 bps, which gives an error of 0.12%. the t3con and t3fd registers are used to control timer 3. t3con C timer 3 control register sfr address: 9eh power-on default: 00h bit addressable: no table 55. t3con sfr bit designations bit no. name description 7 t3bauden t3uartbaud enable. set to enable timer 3 to generate the baud rate. when set, pcon.7, t2con.4, and t2con.5 are ignored. cleared to let the baud rate be generated as per a standard 8052. 6 not implemented. write dont care. 5 not implemented. write dont care. 4 not implemented. write dont care. 3 not implemented. write dont care. 2, 1, 0 div2, div1, div0 binary divider div2 div1 div0 0 0 0 binary divider 0. see table 57. 0 0 1 binary divider 1. see table 57. 0 1 0 binary divider 2. see table 57. 0 1 1 binary divider 3. see table 57. 1 0 0 binary divider 4. see table 57. 1 0 1 binary divider 5. see table 57. 1 1 0 binary divider 6. see table 57.
ADUC845/aduc847/aduc848 rev. a | page 84 of 108 t3fdtimer 3 fractional divider register see table 57 for values. sfr address: 9dh power-on default: 00h bit addressable: no table 56. t3fd sfr bit designations bit no. name description 7 ---- not implemented. write dont care. 6 ---- not implemented. write dont care. 5 t3fd.5 timer 3 fractional divider bit 5. 4 t3fd.4 timer 3 fractional divider bit 4. 3 t3fd.3 timer 3 fractional divider bit 3. 2 t3fd.2 timer 3 fractional divider bit 2. 1 t3fd.1 timer 3 fractional divider bit 1. 0 t3fd.0 timer 3 fractional divider bit 0. table 57. common baud rates using timer 3 with a 12.58 mhz pll clock ideal baud cd div t3con t3fd % error 230400 0 1 81h 2dh 0.18 115200 0 2 82h 2dh 0.18 115200 1 1 81h 2dh 0.18 57600 0 3 83h 2dh 0.18 57600 1 2 82h 2dh 0.18 57600 2 1 81h 2dh 0.18 38400 0 4 84h 12h 0.12 38400 1 3 83h 12h 0.12 38400 2 2 82h 12h 0.12 38400 3 1 81h 12h 0.12 19200 0 5 85h 12h 0.12 19200 1 4 84h 12h 0.12 19200 2 3 83h 12h 0.12 19200 3 2 82h 12h 0.12 19200 4 1 81h 12h 0.12 9600 0 6 86h 12h 0.12 9600 1 5 85h 12h 0.12 9600 2 4 84h 12h 0.12 9600 3 3 83h 12h 0.12 9600 4 2 82h 12h 0.12 9600 5 1 81h 12h 0.12
ADUC845/aduc847/aduc848 rev. a | page 85 of 108 interrupt system the ADUC845/aduc847/ad uc848 provide nine interrupt sources with two priority levels. the control and configuration of the interrupt system is carried out through three interrupt-related sfrs: ie interrupt enable register ip interrupt priority register ieip2 secondary interrupt enable register ieinterrupt enable register sfr address: a8h power-on default: 00h bit addressable: yes table 58. ie sfr bit designations bit no. name description 7 ea set by the user to enable all interrupt sources. cleared by the user to disable all interrupt sources. 6 eadc set by the user to enable the adc interrupt. cleared by the user to disable the adc interrupt. 5 et2 set by the user to enable the timer 2 interrupt. cleared by the user to disable the timer 2 interrupt. 4 es set by the user to enable the uart serial port interrupt. cleared by the user to disable the uart serial port interrupt. 3 et1 set by the user to enable the timer 1 interrupt. cleared by the user to disable the timer 1 interrupt. 2 ex1 set by the user to enable external interrupt 1 (int0 ). cleared by the user to disable external interrupt 1 (int0 ). 1 et0 set by the user to enable the timer 0 interrupt. cleared by the user to disable the timer 0 interrupt. 0 ex0 set by the user to enable external interrupt 0 (int0 ). cleared by the user to disable external interrupt 0 (int0 ). ipinterrupt priority register sfr address: b8h power-on default: 00h bit addressable: yes table 59. ip sfr bit designations bit no. name description 7 ----- not implemented. write dont care. 6 padc adc interrupt priority (1 = high; 0 = low). 5 pt2 timer 2 interrupt priority (1 = high; 0 = low). 4 ps uart serial port interrupt priority (1 = high; 0 = low). 3 pt1 timer 1 interrupt priority (1 = high; 0 = low). 2 px1 int0 (external interrupt 1) priority (1 = high; 0 = low). 1 pt0 timer 0 interrupt priority (1 = high; 0 = low). 0 px0 int0 (external interrupt 0) priority (1 = high; 0 = low).
ADUC845/aduc847/aduc848 rev. a | page 86 of 108 ieip2secondary interrupt enable register sfr address: a9h power-on default: a0h bit addressable: no table 60. ieip2 bit designations bit no. name description 7 ---- not implemented. write dont care. 6 pti time interval counter interrupt priority setting (1 = high, 0 = low). 5 ppsm power supply monitor interrupt priority setting (1 = high, 0 = low). 4 psi spi/i 2 c interrupt priority setting (1 = high, 0 = low). 3 ---- this bit must contain 0. 2 eti set by the user to enable th e time interval counter interrupt. cleared by the user to disable the time interval counter interrupt. 1 epsmi set by the user to enable the power supply monitor interrupt. cleared by the user to disable the power supply monitor interrupt. 0 esi set by the user to enable the spi/i 2 c serial port interrupt. cleared by the user to disable the spi/i 2 c serial port interrupt. interrupt priority the interrupt enable registers are written by the user to enable individual interrupt sources; the interrupt priority registers allow the user to select one of two priority levels for each interrupt. a high priority interrupt can interrupt the service routine of a low priority interrupt, and if two interrupts of different priorities occur at the same time, the higher level interrupt is serviced first. an interrupt cannot be interrupted by another interrupt of the same priority level. if two interrupts of the same priority level occur simultaneously, the polling sequence, as shown in table 61, is observed. table 61. priority within interrupt level interrupt vectors when an interrupt occurs, the program counter is pushed onto the stack, and the corresponding interrupt vector address is loaded into the program counter. the interrupt vector addresses are shown in table 62. table 62. interrupt vector addresses source vector address ie0 0003h tf0 000bh ie1 0013h tf1 001bh ri + ti 0023h tf2 + exf2 002bh rdy0/rdy1 (ADUC845 only) 0033h ispi/i2ci 003bh psmi 0043h tii 0053h wds 005bh source priority description psmi 1 (highest) power supply monitor interrupt wds 2 watchdog timer interrupt ie0 2 external interrupt 0 rdy0/rdy1 3 adc interrupt tf0 4 timer/counter 0 interrupt ie1 5 external interrupt 1 tf1 6 timer/counter 1 interrupt ispi/i2ci 7 spi/i 2 c interrupt ri/ti 8 uart serial port interrupt tf2/exf2 9 timer/counter 2 interrupt tii 11 (lowest) timer interval counter interrupt
ADUC845/aduc847/aduc848 rev. a | page 87 of 108 hardware design considerations this section outlines some of the key hardware design considerations that must be addressed when integrating the ADUC845/aduc847/aduc848 into any hardware system. external memory interface in addition to their internal program and data memories, the parts can access up to 16 mbytes of external data memory (sram). no external program memory access is available. to begin executing code, tie the ea (external access) pin high. when ea is high (pulled up to v dd see figure 69), user program execution starts at address 0 in the internal 62-kbyte flash/ee code space. when executing from internal code space, accesses to the program space above f7ffh (62 kbytes) are read as nop instructions. note that a second very important function of the ea pin is described in the single-pin emulation mode section under the other hardware considerations section. figure 62 shows a hardware configuration for accessing up to 64 kbytes of external data memory. this interface is standard to any 8051 compatible mcu. latch sram oe a8?a15 a0?a7 d0?d7 (data) ADUC845/ aduc847/ aduc848 rd p2 ale p0 we wr 04741-0-059 figure 62. external data memory interface (64-kbyte address space) if access to more than 64 kbytes of ram is desired, a feature unique to the microconverter allows addressing up to 16 mbytes of external ram simply by adding another latch as shown in figure 63. latch p2 ale p0 latch sram a8?a15 a0?a7 d0?d7 (data) a16?a23 oe rd we wr ADUC845/ aduc847/ aduc848 04741-0-060 figure 63. external data memory interface (16-mbtye address space) in either implementation, port 0 (p0) serves as a multiplexed address/data bus. it emits the low byte of the data pointer (dpl) as an address, which is latched by ale prior to data being placed on the bus by the parts (write operation) or the external data memory (read operation). port 2 (p2) provides the data pointer page byte (dpp) to be latched by ale, followed by the data pointer high byte (dph). if no latch is connected to p2, dpp is ignored by the sram, and the 8051 standard of 64-kbyte external data memory access is maintained. the following example shows the code used to write data to external data memory. mov dpp, #10h ;set addr to 100000h mov dph, #00h mov dpl, #00h mov a, #'b' ;write char ?b? (42h) movx @dptr,a ;move to dpp:dph:dpl addr power supplies the parts operational power supply voltage range is 2.7 v to 5.25 v. although the guaranteed data sheet specifications are given only for power supplies within 2.7 v to 3.6 v and 4.75 v to 5.25 v (5% of the nominal 5 v level), the chip functions equally well at any power supply level between 2.7 v and 5.25 v. separate analog and digital power supply pins (av dd and dv dd , respectively) allow av dd to be kept relatively free of the noisy digital signals often present on a system dv dd line. in this mode, the part can also operate with split supplies, that is, using different voltage supply levels for each supply. for example, the system can be designed to operate with a dv dd voltage level of 3 v and the av dd level can be at 5 v, or vice versa, if required. a typical split-supply configuration is shown in figure 64. digital supply analog supply dv dd agnd av dd dgnd ? + ? + 0.1 f 0.1 f 10 f 10 f ADUC845/ aduc847/ aduc848 04741-0-061 6 5 4 22 36 51 50 38 37 23 figure 64. external dual-supply connections (56-lead csp pin numbering)
ADUC845/aduc847/aduc848 rev. a | page 88 of 108 as an alternative to providing two separate power supplies, av dd can be kept quiet by placing a small series resistor and/or ferrite bead between it and dv dd , and then decoupling av dd separately to ground. an example of this configuration is shown in figure 65. in this configuration, other analog circuitry (such as op amps and voltage reference) can be powered from the av dd supply line as well. dv dd agnd av dd dgnd digital suppl y ? + bead 1.6 ? 0.1 f 0.1 f 10 f 10 f ADUC845/ aduc847/ aduc848 04741-0-062 6 5 4 22 36 51 50 38 37 23 figure 65. external single-supply connections (56-lead csp pin numbering) notice that in both figure 64 and figure 65 a large value (10 f) reservoir capacitor sits on dv dd and a separate 10 f capacitor sits on av dd . also, local decoupling capacitors (0.1 f) are located at each v dd pin of the chip. as per standard design practice, be sure to include all of these capacitors and ensure that the smaller capacitors are closer than the 10 f capacitors to each v dd pin with lead lengths as short as possible. connect the ground terminal of each of these capacitors directly to the underlying ground plane. finally, note that, at all times, the analog and digital ground pins on the part must be referenced to the same system ground reference point. it is recommended that the csp paddle be soldered to ensure mechanical stability but be floated with respect to system v dd s or grounds. power-on reset operation an internal power-on reset (por) is implemented on the ADUC845/aduc847/aduc848. for dv dd below 2.63 v, the internal por holds the part in reset. as dv dd rises above 2.63 v, an internal timer times out for typically 128 ms before the part is released from reset. the user must ensure that the power supply has at least reached a stable 2.7 v minimum level by this time. likewise on power-down, the internal por holds the part in reset until the power supply drops below 1 v. figure 66 illustrates the operation of the internal por. 128ms typ 1.0v typ 128ms typ 2.63v typ 1.0v typ internal core reset dv dd 0471-0-063 figure 66. ADUC845/aduc847/aduc848 internal power-on reset operation power consumption the dv dd power supply current consumption is specified in normal and power-down modes. the av dd power supply current is specified with the analog peripherals disabled. the normal mode power consumption represents the current drawn from dv dd by the digital core. the other on-chip peripherals (such as the watchdog timer and power supply monitor) consume negligible current and are therefore included with the normal operating current. the user must add any currents sourced by the parallel and serial i/o pins, and those sourced by the dac to determine the total current needed at the ADUC845/ aduc847/aduc848 dv dd and av dd supply pins. also, current drawn from the dv dd supply increases by approximately 5 ma during flash/ee erase and program cycles. power-saving modes setting the power-down mode bit, pcon.1, in the pcon sfr described in table 6, allows the chip to be switched from normal mode into full power-down mode. in power-down mode, both the pll and the clock to the core are stopped. the on-chip oscillator can be halted or can continue to oscillate, depending on the state of the oscillator power-down bit (osc_pd) in the pllcon sfr. the tic, driven directly from the oscillator, can also be enabled during power-down. however, all other on-chip peripherals are shut down. port pins retain their logic levels in this mode, but the dac output goes to a high impedance state (three-state) while ale and psen outputs are held low. there are five ways to terminate power-down mode: ? asserting the reset pin returns to normal mode. all registers are set to their reset default value and program execution starts at the reset vector once the reset pin is de-asserted. ? cycling power all registers are set to their default state and program exe- cution starts at the reset vector approximately 128 ms later. ? time interval counter (tic) interrupt if the osc_pd bit in the pllcon sfr is clear, the 32 khz oscillator remains powered up even in power-down mode. if the time interval counter (wake-up/rtc timer) is enabled, a tic interrupt wakes the part from power-down mode. the cpu services the tic interrupt. the reti at the end of the tic isr returns the core to the next instruction after that one that enabled power-down.
ADUC845/aduc847/aduc848 rev. a | page 89 of 108 ? spi interrupt if the seripd bit in the pcon sfr is set, an spi interrupt, if enabled, wakes up the part from power-down mode. the cpu services the spi interrupt. the reti at the end of the isr returns the core to the next instruction after the one that enabled power-down. ? int0 interrupt if the int0pd bit in the pcon sfr is set, an external interrupt 0, if enabled, wakes up the part from power- down. the cpu services the interrupt. the reti at the end of the isr returns the core to the next instruction after the one that enabled power-down. wake-up from power-down latency even with the 32 khz crystal enabled during power-down, the pll takes some time to lock after a wake-up from power-down. typically, the pll takes about 1 ms to lock. during this time, code executes, but not at the specified frequency. some opera- tions, for example, uart communications, require an accurate clock to achieve the specified 50 hz/60 hz rejection from the adcs. therefore, it is advisable to wait until the pll has locked before proceeding with normal code execution. the following code can be used to wait for the pll to lock: waitforlock: mov a, pllcon jnb acc.6, waitforlock if the crystal is powered down during power-down, an additional delay is associated with the startup of the crystal oscillator before the pll can lock. typically taking about 150 ms, 32 khz crystals are inherently slow to oscillate. during this time before lock, code executes, but the exact frequency of the clock cannot be guaranteed. for any timing-sensitive operations, it is recommended to wait for lock by using the lock bit in pllcon as shown previously. an alternative way of saving power in power-down mode is to slow down the core clock by using the cd bits in the pllcon register. grounding and board layout recommendations as with all high resolution data converters, special attention must be paid to grounding and pc board layout of ADUC845/ aduc847/aduc848-based designs in order to achieve optimum performance from the adcs and dac. although the parts have separate pins for analog and digital ground (agnd and dgnd), the user must not tie these to separate ground planes unless the two ground planes are connected together very close to the part as shown in the simplified example in figure 67a. in systems where digital and analog ground planes are connected together somewhere else (at the systems power supply, for example), they cannot be connected again near the part since a ground loop would result. in these cases, tie the agnd and dgnd pins of the part to the analog ground plane, as shown in figure 67b. in systems with only one ground plane, ensure that the digital and analog components are physically separated onto separate halves of the board such that digital return currents do not flow near analog circuitry and vice versa. the parts can then be placed between the digital and analog sections, as shown in figure 67c. in all of these scenarios, and in more complicated real-life applications, keep in mind the flow of current from the supplies and back to ground. make sure that the return paths for all currents are as close as possible to the paths the currents took to reach their destinations. for example, do not power components on the analog side of figure 67b with dv dd since that would force return currents from dv dd to flow through agnd. also, try to avoid digital currents flowing under analog circuitry, which could happen if the user placed a noisy digital chip on the left half of the board in figure 67c. whenever possible, avoid large discontinuities in the ground plane(s) (such as are formed by a long trace on the same layer), since they force return signals to travel a longer path. make all connections directly to the ground plane, with little or no trace separating the pin from its via to ground. dgnd agnd place analog components here place digital components here gnd place analog components here place digital components here dgnd a. agnd place analog components here place digital components here b. c. 04741-0-064 figure 67. system grounding schemes if the user plans to connect fast logic signals (rise/fall time < 5 ns) to any of the ADUC845/aduc847/aduc848s digital inputs, add a series resistor to each relevant line to keep rise and fall times longer than 5 ns at the parts input pins. a value of 100 ? or 200 ? is usually sufficient to prevent high speed signals from coupling capacitively into the part and affecting the accuracy of adc conversions.
ADUC845/aduc847/aduc848 rev. a | page 90 of 108 when using the lfcsp package, it is recommended that the paddle underneath the chip be soldered to the board to provide maximum mechanical stability. however, it is recommended that this paddle not be grounded but left floating. all results and specifications contained in this data sheet are taken or recorded with the paddle floating. system self-identification in some hardware designs, it may be an advantage for the software to be able to identify the host microconverter. the chipid sfr is a read-only register located at sfr address c2h. the upper nibble of this sfr designates the microconverter within the -? adc family. user software can read this sfr to identify the host microconverter and therefore execute slightly different code if required. the chipid sfr reads as follows for the -? adc family of microconverter products. note that the ADUC845/aduc847/aduc848 are treated as one part as far as the chipid is concerned. table 63. chipid values for -? microconverter products part chipid aduc816 1xh aduc824 0xh aduc836 3xh aduc834 2xh ADUC845/aduc847/aduc848 axh clock oscillator as described earlier, the core clock frequency for the ADUC845/ aduc847/aduc848 is generated fr om an on-chip pll that locks onto a multiple (384 times) of 32.768 khz. the latter is generated from an internal clock oscillator. to use the internal clock oscillator, connect a 32.768 khz parallel resonant crystal between xtal1 and xtal2 as shown in figure 68. xtal2 32.768khz 12pf 12pf xtal1 to internal pll ADUC845/aduc847/aduc848 04741-0-065 32 33 figure 68. crystal connectivity to ADUC845/aduc847/aduc848 as shown in the typical external crystal connection diagram in figure 68, two internal 12 pf capacitors are provided on-chip. these are connected internally, directly to the xtal1 and xtal2 pins. the total input capacitance at both pins is detailed in the specifications table. note that the total capacitance required for a particular crystal must be in accordance with the crystal manufacturer. however, in most cases, no additional external capacitance is required above that already supplied on-chip. other hardware considerations in-circuit serial download access nearly all ADUC845/aduc847/aduc848 designs can take advantage of the in-circuit reprogrammability of the chip. this is accomplished by a connection to the parts uart, which requires an external rs-232 chip for level translation if down- loading code from a pc. basic configuration of an rs-232 connection is shown in figure 69 with a simple adm3202- based circuit. if users would rather not include an rs-232 chip on the target board, refer to application note uc006, a 4-wire uart-to-pc interface available at www.analog.com/microconverter , for a simple (and zero-cost- per-board) method of gaining in-circuit serial download access to the part.
ADUC845/aduc847/aduc848 rev. a | page 91 of 108 c1+ v+ c1? c2+ c2? v? t2out r2in v cc gnd t1out r1in r1out t1in t2in r2out adm3202 rs232 interface* 1 2 3 4 5 6 7 8 9 dv dd standard d-type serial comms connector to pc host *external uart transceiver integrated in system or as part of an external dongle as described in application note uc006. 0.1 f 0.1 f 0.1 f 0.1 f reset active high. (normally open) 35 34 43 44 1k ? dv dd 1k ? 2-pin header for emulation access (normally open) download/debug enable jumper (normally open) 32.768khz dv dd dv dd av dd av dd agnd agnd refin? refin+ p1.0/ain1 p1.1/ain2 p1.6/i exc 1/ain7 200ma/400ma excitation current rtd r ref 5.6kv psen ea xtal2 xtal1 reset rxd txd dv dd dgnd ADUC845/aduc847/aduc848 csp package 04741-a-001 11 4 5 6 7 8 56 1 17 18 19 22 36 51 37 38 50 23 0.1 f figure 69. uart connectivity in typical system in addition to the basic uart connections, users also need a way to trigger the chip into download mode. this is accomplished via a 1 k? pull-down resistor that can be jumpered onto the psen pin, as shown in figure 69. to get the parts into download mode, connect this jumper and power-cycle the device (or manually reset the device, if a manual reset button is available), and it is ready to receive a new program serially. with the jumper removed, the device powers on in normal mode (and runs the program) whenever power is cycled or reset is toggled. note that psen is normally an output and that it is sampled as an input only on the falling edge of reset, that is, at power-on or upon an external manual reset. note also that if any external circuitry unintentionally pulls psen low during power-on or reset events, it could cause the chip to enter download mode and fail to begin user code execution. to prevent this, ensure that no external signals are capable of pulling the psen pin low, except for the external psen jumper itself or the method of download entry in use during a reset or power-cycle condition. embedded serial port debugger from a hardware perspective, entry to serial port debug mode is identical to the serial download entry sequence described previously. in fact, both serial download and serial port debug modes are essentially one mode of operation used in two different ways. note that the serial port debugger is fully contained on the device, unlike rom monitor type debuggers, and, therefore, no external memory is needed to enable in-system debug sessions.
ADUC845/aduc847/aduc848 rev. a | page 92 of 108 single-pin emulation mode built into the ADUC845/aduc847/aduc848 is a dedicated controller for single-pin in-circuit emulation (ice). in this mode, emulation access is gained by connection to a single pin, the ea pin. normally on the 8051 standard, this pin is hardwired either high or low to select execution from internal or external program memory space. note that external program memory or execu- tion from external program memory is not allowed on the devices. to enable single-pin emulation mode, users need to pull the ea pin high through a 1 k? resistor as shown in figure 69. the emulator then connects to the 2-pin header also shown in figure 69. to be compatible with the standard connector that comes with the single-pin emulator available from accutron limited (www.accutron.com), use a 2-pin 0.1-inch pitch friction lock header from molex (www.molex.com) such as part number 22-27-2021. be sure to observe the polarity of this header. as shown in figure 69, when the friction lock tab is at the right, the ground pin should be the lower of the two pins when viewed from the top. typical system configuration a typical ADUC845/aduc847/aduc848 configuration is shown in figure 69. figure 69 also includes connections for a typical analog measurement application of the parts, namely an interface to an resistive temperature device (rtd). the arrangement shown is commonly referred to as a 4-wire rtd configuration. here, the on-chip excitation current sources are enabled to excite the sensor. the excitation current flows directly through the rtd generating a voltage across the rtd proportional to its resistance. this differential voltage is routed directly to one set of the positive and negative inputs of the adc (ain1, ain2, respectively in this case). the same current that excited the rtd also flows through a series resistance, r ref , generating a ratiometric voltage reference, v ref . the ratiometric voltage reference ensures that variations in the excitation current do not affect the measurement system since the input voltage from the rtd and reference voltage across r ref vary ratiometrically with the excitation current. resistor r ref must, however, have a low temperature coefficient to avoid errors in the reference voltage overtemperature. r ref must also be large enough to generate at least a 1 v voltage reference. the preceding example shows just a single differential adc connection using a single reference input pair. the ADUC845/ aduc847/aduc848 have the capability of connecting to five differential inputs directly or ten single-ended inputs (lfcsp package only) as well as having a second reference input. this arrangement means that different sensors with different reference ranges can be connected to the part with the need for external multiplexing circuitry. this arrangement is shown in figure 70. the bridge sensor shown can be a load cell or a pressure sensor. the rtd is shown using a reference voltage derived from the r ref resistor via the refin inputs, and the bridge sensor is shown using a divided down av dd reference via the refin2 inputs.
ADUC845/aduc847/aduc848 rev. a | page 93 of 108 dv dd 0.1 f reset active high. (normally open) 35 34 43 44 1k ? dv dd 1k ? 2-pin header for emulation access (normally open) download/debug enable jumper (normally open) rs232 connection dv dd dv dd av dd av dd av dd agnd agnd refin? refin+ p1.0/ain1 p1.1/ain2 200ma/400ma excitation current rtd r r psen ea dgnd dv dd xtal2 xtal1 reset rxd txd dv dd dgnd 04741-0-067 11 4 5 6 7 8 56 1 p1.2/ain3/refin2+ ain9 ain10 p1.3/ain4/refin2? r ref 5.6kv 2 15 16 3 17 18 19 22 36 51 37 38 50 23 0.1 f p1.6/i exc 1/ain7 ADUC845/aduc847/aduc848 csp package figure 70. dual reference typical connectivity
ADUC845/aduc847/aduc848 rev. a | page 94 of 108 quickstart development system the quickstart development system is an entry-level, low cost development tool suite supporting the aduc8xx microconverter product family. the system consists of the following pc-based (windows? compatible) hardware and software development tools: hardware: evaluation board and serial port programming cable. software: serial download software. miscellaneous: cd-rom documentation and prototype evaluation board. a brief description of some of the software tools and components in the quickstart system follows. downloadin-circuit serial downloader the serial downloader is a windows application that allows the user to serially download an assembled program (intel? hexa- decimal format file) to the on-chip program flash memory via the serial com port on a standard pc. application note uc004 details this serial download protocol and is available from www.analog.com/microconverter . aspireide the aspire? integrated development environment is a windows application that allows the user to compile, edit, and debug code in the same environment. the aspire software allows users to debug code execution on silicon using the microconverter uart serial port. the debugger provides access to all on-chip peripherals during a typical debug session as well as single-step, animate (automatic single stepping), and break-point code execution control. note that the aspire ide is also included as part of the quickstart-plus system. as part of the quickstart-plus system the aspire ide also supports mixed level and c source debugging. this is not available in the quickstart system where the program is limited to assembly only. quickstart-plus development system the quickstart-plus development system offers users enhanced nonintrusive debug and emulation tools. the system consists of the following pc-based (windows compatible) hardware and software development tools: hardware: prototype board, accutron nonintrusive single-pin emulator. software: aspire integrated development environment. features full c and assembly emulation using the accutron single-pin emulator. miscellaneous: cd-rom documentation.
ADUC845/aduc847/aduc848 rev. a | page 95 of 108 timing specifications ac inputs during testing are driven at dv dd C 0.5 v for logic 1 and 0.45 v for logic 0. timing measurements are made at v ih min for logic 1 and v il max for logic 0 as shown in figure 71. for timing purposes, a port pin is no longer floating when a 100 mv change from load voltage occurs. a port pin begins to float when a 100 mv change from the loaded v oh /v ol level occurs as shown in figure 71. c load for all outputs = 80 pf, unless otherwise noted. av dd = 2.7 v to 3.6 v or 4.75 v to 5.25 v, dv dd = 2.7 v to 3.6 v or 4.75 v to 5.25 v; all specifications t min to t max , unless otherwise noted. table 64. clock input (external clock driven xtal1) parameter 32.768 khz external crystal min typ max unit t ck xtal1 period 30.52 s t ckl xtal1 width low 6.26 s t ckh xtal1 width high 6.26 s t ckr xtal1 rise time 9 ns t ckf xtal1 fall time 9 ns 1/t core core clock frequency 1 0.098 1.57 12.58 mhz t core core clock period 2 0.636 s t cyc machine cycle time 3 10.2 0.636 0.08 s 1 ADUC845/aduc847/aduc848 internal pll locks o nto a multiple (512 times) of the 32.768 k hz external crystal frequency to provide a stable 12.58 mhz internal clock for the system. the core can operate at this frequency or at a binary submultiple called core_clk, selected via the pllcon sfr. 2 this number is measured at the default core_clk operating frequency of 1.57 mhz. 3 ADUC845/aduc847/aduc848 machine cycle time is nominally defined as 1/core_clk. dv dd ? 0.5v 0.45v 0.2dv dd + 0.9v test points 0.2dv dd ? 0.1v v load ? 0.1v v load v load + 0.1v timing reference points v load ? 0.1v v load v load ? 0.1v 04741-0-077 figure 71. timing waveform characteristics
ADUC845/aduc847/aduc848 rev. a | page 96 of 108 table 65. external data memory read cycle parameter 12.58 mhz core clock 6.29 mhz core clock min max min max unit t rlrh rd pulse width 60 125 ns t avll address valid after ale low 60 120 ns t llax address hold after ale low 145 290 ns t rldv rd low to valid data in 48 100 ns t rhdx data and address hold after rd 0 0 ns t rhdz data float after rd 150 625 ns t lldv ale low to valid data in 170 350 ns t avdv address to valid data in 230 470 ns t llwl ale low to rd or wr low 130 255 ns t avwl address valid to rd or wr low 190 375 ns t rlaz rd low to address float 15 35 ns t whlh rd or wr high to ale high 60 120 ns 04741-0-078 ale (o) port 0 (i/o) port 2 (o) t whlh t lldv t llwl t rlrh t avwl t llax t avll t rlaz t rhdx t rhdz t avdv a0 [ a7 (out) data (in) a16 [ a23 a8 a15 t rldv psen (o) rd (o) figure 72. external data memory read cycle
ADUC845/aduc847/aduc848 rev. a | page 97 of 108 table 66. external data memory write cycle parameter 12.58 mhz core clock 6.29 mhz core clock min max min max unit t wlwh wr pulse width 65 130 ns t avll address valid after ale low 60 120 ns t llax address hold after ale low 65 135 ns t llwl ale low to rd or wr low 130 260 ns t avwl address valid to rd or wr low 190 375 ns t qvwx data valid to wr transition 60 120 ns t qvwh data setup before wr 120 250 ns t whqx data and address hold after wr 380 755 ns t whlh rd or wr high to ale high 60 125 ns 04741-0-079 ale (o) port 2 (o) t whlh t wlwh t llwl t avwl t llax t avll t qvwx t qvwh t whqx a0 [ a7 data a16 [ a23 v8 a15 psen (o) wr (o) figure 73. external data memory write cycle
ADUC845/aduc847/aduc848 rev. a | page 98 of 108 table 67. i 2 c compatible interface timing parameter parameter min max unit t l sclock low pulse width 1.3 s t h sclock high pulse width 0.6 s t shd start condition hold time 0.6 s t dsu data setup time 100 s t dhd data hold time 0.9 s t rsu setup time for repeated start 0.6 s t psu stop condition setup time 0.6 s t buf bus free time between a stop condition and a start condition 1.3 s t r rise time of both sclock and sdata 300 ns t f fall time of both sclock and sdata 300 ns t sup 1 pulse width of spike suppressed 50 ns ____________________________________________ 1 input filtering on both the sclock and sdata inputs suppresses noise spikes less than 50 ns. msb t buf sdata (i/o) sclk (i) stop condition start condition repeated start lsb ack msb 1 2-7 8 9 1 s(r) ps t psu t dsu t shd t dhd t sup t dsu t dhd t h t sup t l t rsu t r t r t f t f 04741-0-080 figure 74. i 2 c compatible interface timing
ADUC845/aduc847/aduc848 rev. a | page 99 of 108 table 68. spi master mode timing (cpha = 1) parameter min typ max unit t sl sclock low pulse width 1 635 ns t sh sclock high pulse width 1 635 ns t dav data output valid after sclock edge 50 ns t dsu data input setup time before sclock edge 100 ns t dhd data input hold time after sclock edge 100 ns t df data output fall time 10 25 ns t dr data output rise time 10 25 ns t sr sclock rise time 10 25 ns t sf sclock fall time 10 25 ns ____________________________________________ 1 characterized under the following conditions: a. core clock divider bits cd2, cd1, and cd0 in pllcon sfr set to 0, 1, and 1, respectively, that is, core clock frequency = 1. 57 mhz. b. spi bit-rate selection bits spr1 and spr0 in spicon sfr set to 0 and 0, respectively. sclock (cpol = 0) t dsu sclock (cpol = 1) mosi miso msb lsb lsb in bits 6?1 bits 6?1 t dhd t dr t dav t df t sh t sl t sr t sf msb in 04741-0-081 figure 75. spi master mode timing (chpa = 1)
ADUC845/aduc847/aduc848 rev. a | page 100 of 108 table 69. spi master mode timing (cpha = 0) parameter min typ max unit t sl sclock low pulse width 1 635 ns t sh sclock high pulse width 1 635 ns t dav data output valid after sclock edge 50 ns t dosu data output setup before sclock edge 150 ns t dsu data input setup time before sclock edge 100 ns t dhd data input hold time after sclock edge 100 ns t df data output fall time 10 25 ns t dr data output rise time 10 25 ns t sr sclock rise time 10 25 ns t sf sclock fall time 10 25 ns 1 characterized under the following conditions: a. core clock divider bits cd2, cd1, and cd0 in pllcon sfr set to 0, 1, and 1, respectively, that is, core clock frequen cy = 1.57 mhz. b. spi bit-rate selection bits spr1 and spr0 in spicon sfr set to 0 and 0, respectively. sclock (cpol = 0) t dsu sclock (cpol = 1) mosi miso msb lsb lsb in bits 6?1 bits 6?1 t dhd t dr t dav t df t dosu t sh t sl t sr t sf msb in 04741-0-082 figure 76. spi master mode timing (chpa = 0)
ADUC845/aduc847/aduc848 rev. a | page 101 of 108 table 70. spi slave mode timing (cpha = 1) parameter min typ max unit t ss ss to sclock edge 0 ns t sl sclock low pulse width 330 ns t sh sclock high pulse width 330 ns t dav data output valid after sclock edge 50 ns t dsu data input setup time before sclock edge 100 ns t dhd data input hold time after sclock edge 100 ns t df data output fall time 10 25 ns t dr data output rise time 10 25 ns t sr sclock rise time 10 25 ns t sf sclock fall time 10 25 ns t sfs ss high after sclock edge 0 ns miso mosi sclock (cpol = 1) sclock (cpol = 0) ss msb bits 6?1 lsb bits 6?1 lsb in t dhd t dsu t dr t df t dav t sh t sl t sr t sf t sfs msb in t ss 04741-0-083 figure 77. spi slave mode timing (chpa = 1)
ADUC845/aduc847/aduc848 rev. a | page 102 of 108 table 71. spi slave mode timing (cpha = 0) parameter min typ max unit t ss ss to sclock edge 0 ns t sl sclock low pulse width 330 ns t sh sclock high pulse width 330 ns t dav data output valid after sclock edge 50 ns t dsu data input setup time before sclock edge 100 ns t dhd data input hold time after sclock edge 100 ns t df data output fall time 10 25 ns t dr data output rise time 10 25 ns t sr sclock rise time 10 25 ns t sf sclock fall time 10 25 ns t doss data output valid after ss edge 20 ns t sfs ss high after sclock edge ns miso mosi sclock (cpol = 1) sclock (cpol = 0) ss msb bits 6?1 lsb bits 6?1 lsb in t dhd t dsu t dr t df t dav t doss t sh t sl t sr t sf t sfs msb in t ss 04741-0-084 figure 78. spi slave mode timing (chpa = 0)
ADUC845/aduc847/aduc848 rev. a | page 103 of 108 table 72. uart timing (shift register mode) parameter 12.58 mhz core_clk variable core_clk min typ max min typ max unit txlxl serial port clock cycle time 954 12t core ns tqvxh output data setup to clock 662 ns tdvxh input data setup to clock 292 ns txhdx input data hold after clock 0 ns txhqx output data hold after clock 22 ns set ri or set ti bit 6 t xlxl txd (output clock) rxd (output data) rxd (input data) bit 1 lsb lsb bit 1 bit 6 msb t xhqx t qvxh t dvxh t xhdx 04741-0-086 figure 79. uart timing in shift register mode
ADUC845/aduc847/aduc848 rev. a | page 104 of 108 outline dimensions seating plane view a 2.45 max 1.03 0.88 0.73 top view (pins down) 1 39 40 13 14 27 26 52 pin 1 0.65 bsc 14.15 13.90 sq 13.65 7.80 ref 1 0 . 2 0 1 0 . 0 0 s q 9 . 8 0 0.38 0.22 view a rotated 90 ccw 2.10 2.00 1.95 7 0 0.13 min coplanarity 0.25 max 10 6 2 0.23 0.11 compliant to jedec standards mo-112-ac-1 figure 80. 52-lead metric quad flat package [mqfp] (s-52) dimensions shown in millimeters pin 1 indicator top view 7.75 bsc sq 8.00 bsc sq 1 56 14 15 43 42 28 29 bottom view 6.25 6.10 5.95 0.50 0.40 0.30 0.30 0.23 0.18 0.50 bsc 0.20 ref 12 max 0.80 max 0.65 typ 1.00 0.85 0.80 6.50 ref seating plane 0.60 max 0.60 max pin 1 indicator coplanarity 0.08 sq 0.05 max 0.02 nom 0.25 min compliant to jedec standards mo-220-vlld-2 figure 81. 56-lead frame chip scale package [lfcsp] (cp-56) dimensions shown in millimeters
ADUC845/aduc847/aduc848 rev. a | page 105 of 108 ordering guide model 1 temperature range package description package option ADUC845bs62-5 ?40c to +125c 52-lead plastic quad flatpack, 62-kbyte, 5 v s-52 ADUC845bs62-3 ?40c to +125c 52-lead plastic quad flatpack, 62-kbyte, 3 v s-52 ADUC845bs8-5 ?40c to +125c 52-lead plas tic quad flatpack, 8-kbyte, 5 v s-52 ADUC845bs8-3 ?40c to +125c 52-lead plas tic quad flatpack, 8-kbyte, 3 v s-52 ADUC845bcp62-5 ?40c to +85c 56-lead ch ip scale package, 62-kbyte, 5 v cp-56 ADUC845bcp62-3 ?40c to +85c 56-lead ch ip scale package, 62-kbyte, 3 v cp-56 ADUC845bcp8-5 ?40c to +85c 56-lead chip scale package, 8-kbyte, 5 v cp-56 ADUC845bcp8-3 ?40c to +85c 56-lead chip scale package, 8-kbyte, 3 v cp-56 aduc847bs62-5 ?40c to +125c 52-lead plastic quad flatpack, 62-kbyte, 5 v s-52 aduc847bs62-3 ?40c to +125c 52-lead plastic quad flatpack, 62-kbyte, 3 v s-52 aduc847bs32-5 ?40c to +125c 52-lead plastic quad flatpack, 32-kbyte, 5 v s-52 aduc847bs32-3 ?40c to +125c 52-lead plastic quad flatpack, 32-kbyte, 3 v s-52 aduc847bs8-5 ?40c to +125c 52-lead plas tic quad flatpack, 8-kbyte, 5 v s-52 aduc847bs8-3 ?40c to +125c 52-lead plas tic quad flatpack, 8-kbyte, 3 v s-52 aduc847bcp62-5 ?40c to +85c 56-lead ch ip scale package, 62-kbyte, 5 v cp-56 aduc847bcp62-3 ?40c to +85c 56-lead ch ip scale package, 62-kbyte, 3 v cp-56 aduc847bcp8-5 ?40c to +85c 56-lead chip scale package, 8-kbyte, 5 v cp-56 aduc847bcp8-3 ?40c to +85c 56-lead chip scale package, 8-kbyte, 3 v cp-56 aduc848bs62-5 ?40c to +125c 52-lead plastic quad flatpack, 62-kbyte, 5 v s-52 aduc848bs62-3 ?40c to +125c 52-lead plastic quad flatpack, 62-kbyte, 3 v s-52 aduc848bs32-5 ?40c to +125c 52-lead plastic quad flatpack, 32-kbyte, 5 v s-52 aduc848bs32-3 ?40c to +125c 52-lead plastic quad flatpack, 32-kbyte, 3 v s-52 aduc848bs8-5 ?40c to +125c 52-lead plas tic quad flatpack, 8-kbyte, 5 v s-52 aduc848bs8-3 ?40c to +125c 52-lead plas tic quad flatpack, 8-kbyte, 3 v s-52 aduc848bcp62-5 ?40c to +85c 56-lead ch ip scale package, 62-kbyte, 5 v cp-56 aduc848bcp62-3 ?40c to +85c 56-lead ch ip scale package, 62-kbyte, 3 v cp-56 aduc848bcp8-5 ?40c to +85c 56-lead chip scale package, 8-kbyte, 5 v cp-56 aduc848bcp8-3 ?40c to +85c 56-lead chip scale package, 8-kbyte, 3 v cp-56 eval-ADUC845qs quickstart development system eval-ADUC845qsp 2 quickstart-plus development system eval-aduc847qs quickstart development system eval-aduc847qsp 2 quickstart-plus development system 1 the -3 and -5 in the model column indicate the dv dd operating voltage. 2 the quickstart plus system can only be ordered directly from accutron. it can be purchased from the website www.accutron.com.
ADUC845/aduc847/aduc848 rev. a | page 106 of 108 notes
ADUC845/aduc847/aduc848 rev. a | page 107 of 108 notes
ADUC845/aduc847/aduc848 rev. a | page 108 of 108 notes purchase of licensed i 2 c components of analog devices or one of its sublicensed associated companies conveys a license for the purchaser under the phi lips i 2 c patent rights to use these components in an i 2 c system, provided that the system conforms to the i 2 c standard specification as defined by philips. ? 2004 analog devices, inc. all rights reserved. trademarks and registered trademarks are the prop erty of their respective owners. d04741C0C6/04(a)


▲Up To Search▲   

 
Price & Availability of ADUC845

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X